On 03/04/17 17:26, Daniel Pocock wrote:


On 03/04/17 17:56, Luis Azedo wrote:
kazoo module uses whatever rabbitmq supports (AMQP 0-9-1)

https://www.rabbitmq.com/protocol.html


content type is

props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG;
props.content_type = amqp_cstring_bytes("application/json");

this is enforced in publishing and consuming

and the proper url for the kazoo module would
be https://github.com/kamailio/kamailio/tree/master/src/modules/kazoo

kazoo module is built with https://github.com/alanxz/rabbitmq-c

if you're using python, you may want to
try https://pika.readthedocs.io/en/0.10.0/ instead


Hi Luis,

Thanks for the feedback

When I receive the messages using the Qpid Proton C++ client library (it
talks to RabbitMQ using AMQP 1.0), it receives binary messages.

Does your code send them in to RabbitMQ using type binary or string?

If you submit the body as a string, do you believe RabbitMQ server is
changing the type from string to binary?

In AMQP 0-9-1, the body content of messages is always 'binary' i.e. untyped bytes. There is then a content-type property that lets you determine how to handle it (as for HTTP for example).

I suspect that RabbitMQ converts such messages to binary when converting to AMQP 1.0. If it retains the content-type property you could use that on the receiver side to convert to a string where appropriate.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to