[rabbitmq-discuss] How to stop a consumer from consuming message after a message SHUTDOWN

Rob Harrop rob at rabbitmq.com
Mon Jul 18 12:31:23 BST 2011


Toni,

Once your consumer receives the SHUTDOWN message you can simply have it
issue a Channel.basicCancel passing in the consumer's consumer tag.

The tag is returned by the basicConsume method, and is either one you
supplied or a broker-generated one.

Regards,

Rob


Toni Van de Voorde wrote:
> Hello all,
>
> We have a java application with rabbitmq consumers which processes
> different things based on a given message published from a php application.
>
> When we need to upgrade the java application we would like a save way to
> shutdown the java. We thought about sending a message SHUTDOWN. But we
> can't seem to find a way to stop the consumer from consuming. Is it the
> correct way to do it or is there another way.
>
> The java application is running in background on linux (not through an
> application server).
>
> Thx
>
> _______________________________________________
> 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