hi

I am a novice user. I just want to know when we use shared queue how to
ensure the delivery and durability of message?

Any help will be appreciable.

Thank You
--
View this message in context: http://old.nabble.com/How-to-ensure-the-message-delivery-using-shared-queues-tp29933060p29933060.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

  • Rob Harrop at Oct 14, 2010 at 2:19 pm
    Hi,

    For your queue setup you should make sure that you are creating a durable queue. If the queue is not durable it will just disappear when the server is restarted.

    On the publish side, you want to make sure that you set delivery mode to 2 (persistent). By default, delivery mode is set to 1 (transient). In Java this looks like:

    AMQP.BasicProperties props = new AMQP.BasicProperties();
    props.setDeliveryMode(2);

    channel.basicPublish("amq.direct", "test", props, "test".getBytes());

    You might want to do your publish transactionally to be certain that the messages have been written to disk. Once you get back tx.commit_ok you can be sure that persistent messages published in that transaction are written to disk.

    On the consume side, you can work with noAck=false and only acknowledge the messages when they are successfully processed.

    If a Channel closes without acknowledging a message that has been delivered to it for a given queue, then that message will be redelivered to another consumer on that queue.

    I hope this helps. Let me know if you need any more detail.

    Rob
    On 11 Oct 2010, at 12:13, padl wrote:


    hi

    I am a novice user. I just want to know when we use shared queue how to
    ensure the delivery and durability of message?

    Any help will be appreciable.

    Thank You
    --
    View this message in context: http://old.nabble.com/How-to-ensure-the-message-delivery-using-shared-queues-tp29933060p29933060.html
    Sent from the RabbitMQ mailing list archive at Nabble.com.

    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedOct 11, '10 at 11:13a
activeOct 14, '10 at 2:19p
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Rob Harrop: 1 post Padl: 1 post

People

Translate

site design / logo © 2022 Grokbase