[rabbitmq-discuss] Java client and Qpid
Dmitry Andrianov
dmitry.andrianov at alertme.com
Fri Jun 14 17:43:17 BST 2013
Hi.
I have a Java application which acts a bit like Shovel plugin - it
receives messages from one AMQP broker (Apache Qpid) and forwards them
to another (RabbitMQ). As the RabbitMQ is the "main" broker, I'm using
its Java library to connect to both.
And it is that Qpid to Rabbit Java client integration point that is
giving me headache.
I'm not sure what exactly is going on but after some debugging it looks
to me that scenario is like this:
1. The queue already has some messages at the moment I try to run
basicConsume() on it (it is a durable queue)
2. ChannelN.basicConsume() begins its RPC call and waits for the reply
3. ChannelN.processAsync() gets invoked with the first message BEFORE
the reply to that RPC is received
4. As there is no ConsumerTag yet in the _consumers map (it gets there
when RPC completes), processAsync() throws "Unsolicited delivery" exception.
Unfortunately I do not know the protocol well enough to understand if
Qpid violates it by sending me a message before sending reply to
basicConsume request or not. Without reading the specs I would assume
that this behaviour is a valid one and it is RabbitMQ Java client that
needs to be more tolerant.
Could you please advise?
Thank you.
This email is for the use of the intended recipient(s) only.
If you have received this email in error, please notify the sender immediately and then delete it.
If you are not the intended recipient, you must not use, disclose or distribute this email without the
author's prior permission. AlertMe.com Ltd. is not responsible for any personal views expressed
in this message or any attachments that are those of the individual sender.
AlertMe.com Ltd, 30 Station Road, Cambridge, CB1 2RE, UK.
Registered in England, Company number 578 2908, VAT registration number GB 895 9914 42.
More information about the rabbitmq-discuss
mailing list