[rabbitmq-discuss] Messages does not survive a RabbitMQ service restart
marcos.torres at gmail.com
Thu Nov 28 15:19:22 GMT 2013
Thank you sir, works great.
On Thu, Nov 28, 2013 at 12:07 PM, Simon MacMullen <simon at rabbitmq.com>wrote:
> On 28/11/13 14:56, Marcos Torres wrote:
>> Hi there.
>> The messages stored in a durable queue doesn't survive a service restart
>> (I'm using windows version of Rabbit).
>> I'm using message confirmation, but clearly I need to do something else.
> You are not marking messages as persistent. I am no .NET expert but I
> think you need something like:
> This is how I'm publishing the messages :
>> using (var channel =
>> channel.ConfirmSelect(); //enable confirms on channel
> IBasicProperties props = channel.CreateBasicProperties();
> props.DeliveryMode = 2; // Persistent
> foreach (var message in messages)
>> var serialization =
>> _serializer.Serialize(message , Encoding.UTF8);
> string.Empty, props, serialization);
> Cheers, Simon
> Simon MacMullen
> RabbitMQ, Pivotal
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss