0
votes

We have a clustered weblogic 10.3.4 domain with 2 jms servers - each having a UDQ deployed within a module. At any given time ONLY one of these queues holds about 5000 jms messages (hypothetical number).

On the consumer side we have client code that connects to these queues to consume all the 5000 messages. The way this code works is by using a comma separated list of t3 provider url's. The problem here is if the client gets a connection to the jms server that does not have messages it thinks there are no messages to be processed.

Is there a configuration setting or code logic that can be leveraged to connect to all the providers and consume messages in batches of 100 until none of the queues have messages left?

1

1 Answers

0
votes

This is a bit more brute-force than you may want, but you could:

  1. Take a copy of the t3 connect url string.
  2. Execute a normal connect against the t3 urls. If it skips the first n urls, that means they are off line.
  3. Consume all the messages from the connection.
  4. Disconnect.
  5. Remove the url you just connected to, and all the ones before it.
  6. If there are any urls left, Go To #2. Otherwise, Go To #1.

Some additional considerations:

  • You might want to add a pause after #6.
  • Simply acquire a connection for every URL in the list and start a message listener for each one.