[rabbitmq-discuss] When I switch my network connection from one wifi router to another, two consumers are created
Liong Hung Wong
lhwong at gmail.com
Thu Oct 31 07:46:07 GMT 2013
Hi,
I am creating an Android app to receive push message from RabbitMQ server
with the following
queueName = "queue123";
channel.queueDeclare(queueName, true, false, false, null); //durable =
true, exclusive = false, autoDelete = false
consumer = new QueueingConsumer(channel);
channel.basicConsume(queueName, false, consumer);
I want to be able to receive message pushed when the connection to Internet
is not available, hence, I set the autoDelete attribute to false.
When I switch my network connection from one wifi router to another, two
consumers are created for the queue as below. In that case, messages will
be distributed between both consumers, hence, the app only receives
alternate message until the first connection timeout due to heartbeat
setting.
Consumers Channel Consumer tag Ack required Exclusive 210.19.225.88:36920
(1)<http://dev.wkl.com:15672/#/channels/210.19.225.88%3A36920%20-%3E%20172.25.0.90%3A5672%20%281%29>
amq.ctag-ma8QOXnZ_UAK-R7wddQGXA ● ○ 210.19.225.3:60659 (1)<http://dev.wkl.com:15672/#/channels/210.19.225.3%3A60659%20-%3E%20172.25.0.90%3A5672%20%281%29>
amq.ctag-igoa2WysTs79WAk969UFJg ● ○
I am not able to cancel the first consumer with
channel.basicCancel(consumerTag) when as the connection has already been
closed. Is there any way to overcome this problem?
Regards,
--Wong Liong Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131031/7b0d01ef/attachment.htm>
More information about the rabbitmq-discuss
mailing list