[rabbitmq-discuss] Different objects being passed thru RabbitMQ

Wizaerd wizaerd at gmail.com
Fri Aug 17 20:44:01 BST 2012


I'm working well with RabbitMQ thus far, however I have a question about 
how to approach something.  Right now I have a series of consumer 
applications that knows exactly what type of serislaized object is coming 
to the queue, as they are specialized for the specific object types to 
process.  However, the architect wants a more generic listener that pull 
messages from the queue, but the messages body would be a different type of 
serialized object.  for example it could be a User object, or a Course 
object, etc...  In my listener, what is the best way to dynamically 
determine the type of object being passed in, thus being able to 
deserialize it and work with it?  I had tried adding a custom header to the 
headers collection with the Type, but RabbitMQ threw an error, and I was 
never able to get the Type to pass thru, plus there was no way to 
dynamically deserialize into the Type of object.  Unfortunately, the Type 
of object is not going to be acceptable.

Anyone have any suggestion I could try and/or research?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120817/ab1b57a4/attachment.htm>


More information about the rabbitmq-discuss mailing list