[rabbitmq-discuss] RabbitMQ persistence and multi producers- multi consumers

Andreas Jung lists at zopyx.com
Fri Jul 9 11:22:02 BST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francisco Gonzalez-Blanch wrote:
> Hi all,
> 
> I'm a newbie in rabbitmq and i'm working on a distributed data
> processing application using rabbitmq as distributed task queue. I want
> to ask you about where can i find information about how to make
> persistent queues, and how to make that, if a producer sends messages to
> queue and no one is listen to it and then a consumer is attached , the
> consumer gets all the messages, even the ones that were produced before
> the consumer was attached. Thank you very much.

Queues are configured/created by the consumer (not by the producer) and
they must be marked as "durable". In Python we do something like

 15         conn = BrokerConnection(hostname=config['host'],
 16                                 port=config['port'],
 17                                 userid=config['username'],
 18                                 password=config['password'])
 19         consumer = Consumer(connection=conn,
 20                             queue=config['queue'],
 21                             routing_key=config['queue'],
 22                             exchange=exchange,
 23                             durable=True,
 24                             )

Other bindings likely take a similar approach/API.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw2+EoACgkQCJIWIbr9KYzPjwCg4wAh/fgiScBPGgS3o1EsD+VP
VuUAnittbMxyxNpfY77sxi2kE8mYKl7k
=K1Qd
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 330 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100709/0be53da0/attachment.vcf>


More information about the rabbitmq-discuss mailing list