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.

Search Discussions

  • Simon MacMullen at Jun 14, 2013 at 4:52 pm

    On 14/06/13 17:43, Dmitry Andrianov wrote:
    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.

      From the spec:

    Section 4.6, Content Synchronisation:

    In certain cases synchronous request-response methods have an impact
    on asynchronous content delivery on the same channel, including:

    * The Basic.Consume and Basic.Cancel methods, which start and stop
    the flow of messages from a message queue.

    [Snip a couple of other cases]

    Guidelines for implementers:

    * The effects of the request-response MUST NOT be visible on the
    channel before the response method, and MUST be visible thereafter.

    So I'm afraid it's QPid at fault. (Which version are you using? I
    thought they had abandoned support for AMQP 0-9-1 some time ago.)


    Cheers, Simon


    --
    Simon MacMullen
    RabbitMQ, Pivotal
  • Dmitry Andrianov at Jun 14, 2013 at 6:04 pm
    Simon,
    many thanks for the prompt reply.


    I use Qpid 0.20, Next week will try to create simple test case and run it against both 0.20 and the latest 0.22


    If problem is reproducible - will raise issue on their bugtracker quoting you )


    Thanks




    On 14 Jun 2013, at 17:52, Simon MacMullen wrote:

    On 14/06/13 17:43, Dmitry Andrianov wrote:
    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.
    From the spec:
    Section 4.6, Content Synchronisation:

    In certain cases synchronous request-response methods have an impact
    on asynchronous content delivery on the same channel, including:

    * The Basic.Consume and Basic.Cancel methods, which start and stop
    the flow of messages from a message queue.
    [Snip a couple of other cases]
    Guidelines for implementers:

    * The effects of the request-response MUST NOT be visible on the
    channel before the response method, and MUST be visible thereafter.
    So I'm afraid it's QPid at fault. (Which version are you using? I
    thought they had abandoned support for AMQP 0-9-1 some time ago.)

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, Pivotal
    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.
  • Dmitry Andrianov at Jun 17, 2013 at 5:28 pm
    JFYI, the simple test case I created fails with Qpid 0.20 but works ok with 0..22


    Thanks!


    On 14 Jun 2013, at 19:04, Dmitry Andrianov wrote:

    Simon,
    many thanks for the prompt reply.

    I use Qpid 0.20, Next week will try to create simple test case and run it against both 0.20 and the latest 0.22

    If problem is reproducible - will raise issue on their bugtracker quoting you )

    Thanks

    On 14 Jun 2013, at 17:52, Simon MacMullen wrote:
    On 14/06/13 17:43, Dmitry Andrianov wrote:
    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.
    From the spec:
    Section 4.6, Content Synchronisation:

    In certain cases synchronous request-response methods have an impact
    on asynchronous content delivery on the same channel, including:

    * The Basic.Consume and Basic.Cancel methods, which start and stop
    the flow of messages from a message queue.
    [Snip a couple of other cases]
    Guidelines for implementers:

    * The effects of the request-response MUST NOT be visible on the
    channel before the response method, and MUST be visible thereafter.
    So I'm afraid it's QPid at fault. (Which version are you using? I
    thought they had abandoned support for AMQP 0-9-1 some time ago.)

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, Pivotal
    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.


    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJun 14, '13 at 4:43p
activeJun 17, '13 at 5:28p
posts4
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2017 Grokbase