qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xiaodan.wang" <xiaodan.w...@salesforce.com>
Subject Re: 1 Queue with 2 Consumers - turn off pre-fetching?
Date Fri, 29 Aug 2014 22:10:54 GMT
rgodfrey wrote
> Is the destination that the message was sent to / the consumer that was
> created to receive the message a Queue or a Topic?
> 
> I did a little test myself (sending to a queue object, receiving from a
> queue object) and the object that I got back from getJMSDestination() was
> a
> queue (and not a Topic as you seem to be getting)... however I did notice
> that the queue seemed to be in binding URL and not Address format - so I
> will try to fix that at least.

Hi Rob, some additional context on the behavior I'm seeing. The queues were
originally created on a v0.16 broker using AMQP 0-10 and are addressed as
follow:
'Q1'/None; {
  'create': 'always',
  'node': {
    'durable': 'true',
    'type': 'queue',
    'x-declare': {
      'arguments': {
        'x-qpid-priorities': 10
      }
    }
  }
}

Using an AMQP 0-10 client, I'm seeing the following:
a) When message is enqueued type is: AMQAnyDestination
b) When we create the consumer: AMQAnyDestination
c) when we call getJMSDestination after message is received:
AMQAnyDestination

Using AMQP 0-91 client (jvm argument -Dqpid.amqp.version=0-91 with no other
code changes):
a) When message is enqueued type is: AMQAnyDestination
b) When we create the consumer: AMQAnyDestination
c) when we call getJMSDestination after message is received: *AMQTopic*
topic://<<default>>/Q1/?routingkey='Q1'&exclusive='true'&autodelete='true'

I did notice a slight difference in the destination string when message is
enqueued through a AMQP 0-91 client:

'Q1'/None; {
  'create': 'always',
  'node': {
    'durable': 'true',
    'type': 'queue',
    'x-declare': {
      'arguments': {
        *'no-local': False,*
        'x-qpid-priorities': 10
      }
    }
  }
}

I think the "*'no-local': False,*" parameter has no impact on our
application since we use separate connections to enqueue messages vs
receiving messages.

Now that I think about it, I'm seeing another issue that might be related to
this (i.e. message received in AMQP 0-91 returns a destination of type
AMQTopic). With AMQP 0-10, we were able to repeatedly call consumer.receive
in order to fetch additional (>1) messages from the queue. Using AMQP 0-91,
consumer.receive only returns a single message, subsequent invocations time
out (even though messages are available). Only if we committed on the
session after each receive were we able to fetch all messages from the
queue.




--
View this message in context: http://qpid.2158936.n2.nabble.com/Re-1-Queue-with-2-Consumers-turn-off-pre-fetching-tp6934582p7612825.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message