0

My work requires the queues get 3 different pieces of data to work. an int, a double and a int[] list.

From the tutorials I only see single Strings being sent. Can I send multiple types of data in a queue without having to convert it to a string?

Edit: my work around I figured was to convert everything to a string and I can submit it one at a time but what about queues that have require multiple data?

Lostsoul
  • 25,013
  • 48
  • 144
  • 239

1 Answers1

2

RabbitMQ messages are simply streams of bytes. You can send whatever you want in these messages, so if you're doing this from Java you should pick a serializer to convert your objects into byte streams of XML or JSON or whatever you prefer:

XML serialization in Java?

http://flexjson.sourceforge.net/

Community
  • 1
  • 1
Brian Kelly
  • 19,067
  • 4
  • 53
  • 55