Erlang Mailing Lists

Author Message

<  RabbitMQ mailing list  ~  Durable Queues

Guest
Posted: Thu Dec 13, 2007 11:50 pm Reply with quote
Guest
Hi,

I think someone posted about this earlier, but I'm still a little
stuck. I want to save messages in a queue to disk. I made the queue
durable like so:

channel.queueDeclare(ticket, queueName, false, true, true, false, null)

where the first true indicates the queue is durable. My messages are
tagged as persistent like this:

new AMQP.BasicProperties("", "", null, 2, 0, "", "", "", "", new Date
(), "", userName, "", "")

when setting the BasicProperties object.

I assume if you want to read messages from a durable cue you would
use channel.basicGet. I'm not sure where I'm going wrong
with these steps, so any help would be appreciated.

Thanks,
Varun

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
tonyg
Posted: Fri Dec 14, 2007 1:54 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi Varun,

You're on the right track. Messages published in persistent mode to
durable queues will survive server restarts. You may wish to consider
using TX mode (txSelect, txCommit etc) to get some acknowledgement of
publication.

You can consume such messages just as if they were transient, that is
with basicGet() or basicConsume(), at your option.

What is the problem you are experiencing?

Regards,
Tony


Varun Samuel wrote:
> I think someone posted about this earlier, but I'm still a little
> stuck. I want to save messages in a queue to disk. I made the queue
> durable like so:
>
> channel.queueDeclare(ticket, queueName, false, true, true, false, null)
>
> where the first true indicates the queue is durable. My messages are
> tagged as persistent like this:
>
> new AMQP.BasicProperties("", "", null, 2, 0, "", "", "", "", new Date
> (), "", userName, "", "")
>
> when setting the BasicProperties object.
>
> I assume if you want to read messages from a durable cue you would
> use channel.basicGet. I'm not sure where I'm going wrong
> with these steps, so any help would be appreciated.
>
> Thanks,
> Varun
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss@lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


--
[][][] Tony Garnock-Jones | Mob: +44 (0)7905 974 211
[][] LShift Ltd | Tel: +44 (0)20 7729 7060
[] [] http://www.lshift.net/ | Email: tonyg@lshift.net

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
View user's profile Send private message MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum