Flush JMS queue
jduprezDec 17 2004 — edited Sep 27 2006Hello,
I am new to JMS, and I have to find a way to flush a persistent queue on a cluster that will be demoted. I would like to consume all pending messages, and record them in a specific store, where they would be either processed manually, or sent to a new applicative queue on a new cluster.
I thought it would be easy to write a batch consumer that would read all messages stored in the queue, but some messages were posted with a specified delivery date (must be a Weblogic-specific thing), and are not delivered before this date.
I guess I can then use a QueueBrowser to peek at all messages in the queue, but then they are not removed from the queue, by definition, which is a problem if the obsolate cluster is restarted - I would first have to empty the JMS store, which is another error prone manual operation.
What do you suggest?
1) Is there a standard API to retrieve pending messages before their intended delivery date, or to flush an existing queue?
I doubt it, as this would pervert the semantics of the delivery date, and possibly break some app-level security.
2) Is there a Weblogic-specific administrative tool to force delivery of all pending messages regardless of their delivery date?
None found so far in docs.
3) BEA suggested using their Messaging Bridge, but it seems a bit of a hassle to configure.
Anyone has working experience with Weblogic Messaging Bridge?
Thanks,
J.