[rabbitmq-discuss] Messages does not survive a RabbitMQ service restart
Marcos Torres
marcos.torres at gmail.com
Thu Nov 28 14:56:48 GMT 2013
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.
This is how I'm publishing the messages :
using (var channel =
rabbitConnection.Connection.CreateModel())
{
channel.ConfirmSelect(); //enable confirms on channel
foreach (var message in messages)
{
var serialization = _serializer.Serialize(message ,
Encoding.UTF8);
channel.BasicPublish(rabbitAddress.Name,
string.Empty, null, serialization);
}
channel.WaitForConfirms();
}
In the RabbitMQ Management I see the confirmation throughput and the
messages stored in ready state, but once the messages are there and then I
stop the RabbitMQ service, when I start the service again everything is
gone.
For reference I'm using this:
http://www.rabbitmq.com/blog/2011/02/10/introducing-publisher-confirms/and
http://hg.rabbitmq.com/rabbitmq-java-client/file/default/test/src/com/rabbitmq/examples/ConfirmDontLoseMessages.javaalthough
I use C# . I would like to know what I'm doing wrong.
I´m using RabbitMQ 3.1.5, Erlang R16B01
>From my understanding the consumer has nothing to do with persistance. Is
this correct?
Thanks a lot in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131128/22926da5/attachment.html>
More information about the rabbitmq-discuss
mailing list