Closed pardahlman closed 8 years ago
@mrfamazing sorry for not decorating this ticket with description. This ticket is in fact more of a note-to-self; I want to make sure to dispose internal resources (MessageContext caches for message chaining).
However, making RawRabbit
compatible with clients from other libraries and languages should not be a problem. After all, messages are serialized to json by default and headers are provided as expected :+1: . The framework itself is very modular, and it is pretty straight forward to register your own implementation of say IMessageContextProvider
or IBasicPropertiesProvider
etc. From the top of my head there are two things that might need to be tweaked:
MessageContextProviderBase
, and particular the method ExtractContext
assumes that the header is not null. A null check that bailes out with a new TMessageContext
, should be enough to get the message to the handler.JsonSerializer
. Json.Net is configured to serialize $type
information, which clients that uses other message serialisers than Json.Net might not like.I'm currently working with support for .NET Core #99 #102, but as soon as I'm done I'll look closer at this. Let me know if you're making any progress!
Hi again @mrfamazing!
Just letting you know that I've added a specific ticket #103 for supporting handling of messages without context, headers or... anything, really except a valid json body that is deserializable to the class used in the subscriber. Check the PublishAndSubscribeTests.cs
. This will be able in RawRabbit
version 1.10.0
, which will be released soon. If you can't wait, you should be able to implement the changes from commit adbfcfe yourself.
Thanks for the info @pardahlman ! In my current scenario, ended up only needing to publish from .NET to XYZ, so there isn't an issue. But yes #103 is exactly what I had in mind, awesome work on this library!
No problemo, and thanks for the feedback :+1:
This ticket will be fixed by #125
Is the goal here to make RawRabbit more open to messages from any publisher/subscriber, not just .net/RR? I am trying to use RR with a system has other clients that might pub/sub. Message context is one of the things that I am running into trying to send a message from another system. It's a little more complex then just adding a new serializer to consume messages from elsewhere, if impossible at this time. If this isn't the goal of RawRabbit, then you can disregard this, otherwise that would be a great path to go down.