[rabbitmq-discuss] [RabbitMQ - HTTP API] Encoding key is mandatory in order to get messages from a queue

Simon MacMullen simon at rabbitmq.com
Wed May 4 16:40:23 BST 2011

On 04/05/11 16:12, Salvatore Piccione wrote:
> Hello,


> I'm working with RabbitMQ 2.4.1 for Windows and using the HTTP API to
> interact with the RabbitMQ server. I notice that, when I try to get
> messages from a queue, I have to specify the payload encoding - even if
> the HTTP API Specification
> (http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v2_4_1/priv/www-api/help.html)
> doesn't list it in the mandatory keys

I think it should. Will fix.

> - and the only accepted value is "base64".

You should also be able to use "auto", meaning "send me a string if the 
contents of the message can be decoded as UTF-8, and base64 otherwise".


> Is there something wrong in my requests or there is a problem on the
> server side?

In this case it's more a failure of documentation, but I'll get that 
fixed too :)

If you're planning on driving the publish / get part of the management 
plugin API programatically, please remember that it's intended for 
injecting test messages, diagnostics etc - it does nothing around 
reliable delivery (and isn't terribly performant) and so should really 
only be treated as a sysadmin's tool.

For messaging from your application you should use AMQP / STOMP / 
JSON-RPC / etc.

Cheers, Simon
Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware

More information about the rabbitmq-discuss mailing list