On 24 May 2017 at 08:45, girishlc <[email protected]> wrote: > Hi Gordon, > > Thanks for the reply, > > >>Generally, messages are removed from the queue once they have been > >>acknowledged by the consuming client. The default in JMS is (I believe) > >>auto-acknowledge, so when your message listener's onMessage() returns, > >>the library will automatically acknowledge the queue. > > 1. Actually what if some other client also wants to read that message ? >
When using JMS consumers against a queue it is defined that only one consumer will get the message. The only way to read messages from a queue while allowing other clients to also read the same message from the same queue is to use Queue Browsing > 2. Is there any setting that we need to do at Qpid WebManagement portal ? > I can see the status of the message changes from "Available" to > "Acquired" after reading the message from Client, but how to remove this > from the Queue. > Just for clarity, when you say the Qpid Web Management portal, which product are you describing - are you using the Qpid Broker for Java with its built in web console, or a different broker / web management console? > 3. Is there any method to delete the message based on the "Message Id" > JMS does not really have a concept of "deleting" a message. One approach (and not a particularly nice one) is (presuming that you have used a queue browser initially) to create a new consumer for the queue with a selector based on the JMSMessageID. Since the JMSMessageID is unique then that consumer should bring back one message (if the message has not already been deleted), or zero messages if it has been deleted. In general I'd try to avoid this pattern though as it requires creating a new consumer for each message, then closing it again, which is not very efficient. -- Rob > > >>I'm not sure what you mean by 'read module' though. Are you using JMS to > >>consume messages? Or some other API > I'm using JMS in that I've created the new module called read module > which reads the message from Qpid. > > > > > > -- > View this message in context: http://qpid.2158936.n2.nabble. > com/Re-delete-message-from-Queue-through-Java-code-tp7663338p7663340.html > Sent from the Apache Qpid developers mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
