Publishing bytes through Bunny/RabbitMQ

6 views
Skip to first unread message

Wouter A

unread,
Nov 22, 2018, 7:11:31 PM11/22/18
to Ruby RabbitMQ libraries
Hi all,

In the Bunny manual, http://rubybunny.info/articles/exchanges.html, it's advised to encode messages - e.g., using some binary serialization - before publishing them if you're looking for space-efficiency. However, the 'publish' method only seems to accept string payloads for which I can't find out how it will be encoded over the wire. Is it actually possible to publish pure bytes using Bunny/RabbitMQ?


Thanks in advance for your help!


Best regards,
Wouter

Michael Klishin

unread,
Nov 22, 2018, 7:13:57 PM11/22/18
to ruby...@googlegroups.com
All message payloads are opaque byte streams to RabbitMQ. Bytes are framed per protocol requirements and otherwise
published unmodified. So of course you can just provide any string (or byte sequence equivalent in a different client) you please.

--
Bunny: http://rubybunny.info
March Hare: http://rubymarchhare.info
 
IRC: #rabbitmq on irc.freenode.net
 
Post to the group: ruby...@googlegroups.com | unsubscribe: ruby-amqp+...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Ruby RabbitMQ libraries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-amqp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages