pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Can I publish a generic object to a specific queue? #300

Closed carol-braileanu closed 6 years ago

carol-braileanu commented 6 years ago

I have a subscriber for the Notifications class, but the project I am sending the notifications from does not have a reference to the assembly that contains the Notifications class. I would like to know if there a way to build a dynamic/generic object with the same properties and publish it to the Notifications queue?

pardahlman commented 6 years ago

Hi @carol-braileanu - thanks for reaching out! I'm assuming here that you are on the 2.x version of the client. In that case, it is supported out of the box: when you register a subscriber, it will try to deserialize the message body to that type.

pardahlman commented 6 years ago

Closing this due to inactivity.