Sorry for coming late to this thread... On 31 May 2010 22:06, Robbie Gemmell <[email protected]> wrote: > As far as I understand it, setting acquire-mode=PRE_ACQUIRED together with > accept-mode=NONE is the equivalent of NO_ACK mode in JMS terms, whereby the > message is acquired on the broker before being sent to the client and is > then disposed of immediately upon send since no acceptance/acknowledgement > is to be returned. > > I just tried a noddy example based on a modified version of the old > o.a.q.example.amqpexample.direct package and it seemed to work as expected, > the messages were sent and received ok and the message count for the queue > dropped to 0. > > I used the trunk broker as it's what I happened to have running but if you > can fully replicate the issue on 0.6, could you also try it against trunk > and see if it is the same? I can think only think of one issue that has > touched this space in particular recently, but I don't think it would cause > this. It is 6 months since 0.6 branched for release and the 0-10 protocol > support in the Java broker was new at the time so I think trying it against > trunk would be wise in any case. >
I believe there was a bug in the 0-10 code with regards to accept-mode=NONE in the 0.6 release that I subsequently fixed. this is probably what is being seen... However if trunk does not fix this for you, please raise a JIRA as Robbie suggested. I'm a little swamped with AMQP stuff right now, but after the AMQP event next week I should have a little more time to look at Qpid again :-) My apologies... -- Rob > If it does act the same against trunk could you raise a new JIRA and attach > a full sample program to reproduce if you have it, then we'll look into it > at it some point. > > Regards, > Robbie > >> -----Original Message----- >> From: Emmanuel Bourg [mailto:[email protected]] >> Sent: 31 May 2010 09:12 >> To: [email protected] >> Subject: Re: Message count alerts >> >> Le 29/05/2010 17:47, Marnie McCormack a écrit : >> >> > What client are you using to consume the messages ? (I'm assuming not >> java >> > since the accept-mode and acquire-mode settings are not ringing any >> bells >> > with me !) >> >> I'm using the Java client, but the non-JMS one in the >> org.apache.qpid.transport package. I know it isn't officially supported >> by it has some features missing in the JMS client that I need. >> >> >> > If your MessageCount (as opposed to ReceivedMessageCount) is not >> going down >> > then the messages are likely not being ack'd by the consumer. >> >> The message count and received message count are equals. By reading the >> AMQP spec I was under the impression that in implicit/pre-acquired mode >> the acknowledgment wasn't required, and the messages were removed >> automatically from the queue once they were transfered to the client. >> Is >> this correct? >> >> >> > On the java broker, all subscribers to a topic get their own private >> queue >> > created as a temp queue - how exactly are you subscibing to the queue >> (whats >> > the queue called?) - is it possible you have multiple subscribers and >> one of >> > them is not ack-ing ? >> >> There is exactly one producer and one subscriber. The private queue is >> declared like this: >> >> // declare the queue >> String queue = username + "-" + System.currentTimeMillis(); >> session.queueDeclare(queue, null, null, Option.EXCLUSIVE, >> Option.AUTO_DELETE); >> session.messageSubscribe(queue, queue, MessageAcceptMode.NONE, >> MessageAcquireMode.PRE_ACQUIRED, null, 0, null); >> >> // issue credit >> session.messageFlow(queue, MessageCreditUnit.BYTE, >> Session.UNLIMITED_CREDIT); >> session.messageFlow(queue, MessageCreditUnit.MESSAGE, >> Session.UNLIMITED_CREDIT); >> >> // bind a topic to the queue >> session.exchangeBind(queue, "amq.topic", "foo.bar", null); >> >> >> And on the producer side the messages are sent with: >> >> DeliveryProperties deliveryProps = new DeliveryProperties(); >> deliveryProps.setDiscardUnroutable(true); >> deliveryProps.setDeliveryMode(MessageDeliveryMode.NON_PERSISTENT); >> deliveryProps.setRoutingKey("foo.bar"); >> >> session.messageTransfer("amq.topic", MessageAcceptMode.NONE, >> MessageAcquireMode.PRE_ACQUIRED, new Header(deliveryProps), msg); >> >> >> Emmanuel Bourg > > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
