[rabbitmq-discuss] dropped messages on low volume

Matthew Sackman matthew at lshift.net
Wed Jul 1 13:03:28 BST 2009


Hi Joel,

On Wed, Jul 01, 2009 at 12:48:15PM +0100, Joel Reymont wrote:
> Publishing a message then looks like this:
> 
>      Con = lib_amqp:start_connection(Rabbit),
>      Chan = lib_amqp:start_channel(Con),
>      Exch = list_to_binary(Topic),
>      #'exchange.declare_ok'{} = lib_amqp:declare_exchange(Chan, Exch,  
> <<"topic">>),
>      ...
>      lib_amqp:publish(Chan, Exch, <<"raw">>, MsgWithId),
>      lib_amqp:publish(Chan, Exch, <<"http">>, HttpMsg),
>      lib_amqp:publish(Chan, Exch, <<"flash">>, FlashMsg),
>      lib_amqp:teardown(Con, Chan),
> 
> What am I doing wrong and is there a way to do it better?

As a first step to debugging this, I would suggest using transactions.
It's quite possible the teardown is happening before the publishes are
getting out of the socket. Could you thus rework this to use tx_select,
publish and tx_commit? Once you get the commit-ok back, you should know
for certain that the messages have made it to the broker. Please let us
know how you get on.

Cheers,

Matthew




More information about the rabbitmq-discuss mailing list