[rabbitmq-discuss] How to pause and resume consumption gracefully in rabbitmq?
Alvaro Videla
videlalvaro at gmail.com
Thu Dec 19 12:18:14 GMT 2013
Hi,
I've replied on SO. Here's the answer as well:
Is there a reason why you define your own consumer_tags? You can pass
an empty string and let RabbitMQ generate consumer tags for you. The
reply from basic.consume, which is basic.consume-ok will return the
generated consumer_tag, so you can use it later to stop consuming.
See: http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.consume-ok
Regards,
Alvaro
On Thu, Dec 19, 2013 at 1:03 PM, Михаил Доронин <warrior2031 at gmail.com> wrote:
> I'm using python library called pika, and I have a problem which I described
> in this question on stackoverlow.
>
> http://stackoverflow.com/questions/20651111/how-to-pause-and-resume-consumption-gracefully-in-rabbitmq-pika-python
>
> Basically, should I use the same consumer-tag or generate a new one if I'm
> resuming consumption?
>
> If I would generate a new one every time I'm resuming consumption then
> sooner or later it would match some of the previous ones and I would get an
> exception.
>
> четверг, 19 декабря 2013 г., 15:57:09 UTC+4 пользователь Alvaro Videla
> написал:
>>
>> Hi,
>>
>> basic.cancel will stop consuming from a queue. When you want to resume
>> consuming, you can just issue the same basic.consume you did before
>>
>> Regards,
>>
>> Alvaro
>>
>> On Thu, Dec 19, 2013 at 12:49 PM, Михаил Доронин <warri... at gmail.com>
>> wrote:
>> > So...
>> >
>> > _______________________________________________
>> > rabbitmq-discuss mailing list
>> > rabbitmq... at lists.rabbitmq.com
>> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
More information about the rabbitmq-discuss
mailing list