[rabbitmq-discuss] Unicode Characters In AMQP Headers?

Alexandru Scvorţov alexandru at rabbitmq.com
Wed Nov 9 01:19:45 GMT 2011


Hi Chris,

> Furthermore, what should one expect of Rabbit when publishing a message to an exchange with a header named something like "username" with a value of "中文"?

The headers, queue names and exchange names are treated as binary
strings by the broker, i.e. it doesn't ever try to decode them, so they
can have whatever encoding you want.  It's up to the client applications
to make sense of the binary content of the headers.

(The few headers names RabbitMQ *does* interpret, such as
"x-message-ttl", should be ASCII.) 

Cheers,
Alex

On Wed, Nov 09, 2011 at 12:02:08AM +0000, Chris Chew wrote:
> Hello.
> 
> Is there definition somewhere within the AMQP spec for the range of allowable characters in the header values for messages and/or bindings?
> 
> Furthermore, what should one expect of Rabbit when publishing a message to an exchange with a header named something like "username" with a value of "中文"?
> 
> It appears to work properly...I'm just wondering if there are any known side-affects of doing this.
> 
> Thank you!
> 
> -Chris
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list