[rabbitmq-discuss] Getting shovel with a custom header setup

Matthias Radestock matthias at rabbitmq.com
Thu Nov 8 20:44:14 GMT 2012


Jason,

On 08/11/12 19:19, Jason McIntosh wrote:
> Trying to follow the documentation on:
> http://www.rabbitmq.com/shovel.html
> [...]
> {publish_properties, [ {delivery_mode, 2}, {headers, [{"source-ip", "1.1.1.1"}]} ]}
>
> Am I missing something?

try {<<"source-ip">>, longstr, <<"1.1.1.1">>}

i.e. table entries need to triples of key, type, value; keys should be 
binaries (the erlang amqp codec accepts strings too but please don't 
rely on that), the value type depends on the chosen type (binary for 
longstr, numbers for the various numeric types, etc). See 
http://hg.rabbitmq.com/rabbitmq-server/file/02567d68939f/src/rabbit_binary_generator.erl#l116 
for the full list.

Regards,

Matthias.


More information about the rabbitmq-discuss mailing list