JMS and Weblogic Clustering

The Weblogic app servers I use are grouped. I created a JMS queue and it is named JNDI. When the consumer looks at the jndi name and publishes the event to the queue, will it be published to the queue created on both app servers? The same MDB will work on both servers - which one will receive the message sent to the queue? In case I need to delete a message placed in the queue, do I have to iterate over all nodes and delete the message?



source to share

2 answers

Using a queue means that the message is guaranteed to be consumed exactly once. This means that the message will be delivered to both nodes, but it will only be processed once globally by one of the nodes. WebLogic handles synchronization and coordination between nodes in your cluster to guarantee delivery at the same time, but make sure it is processed exactly once globally.

This is in contrast to the theme where each caller receives a copy of the message. Each message will be processed once by each subscriber.

You don't have to iterate over the nodes to delete a message ... just take the jndi link into the queue and delete the message before any consumer consumes it.



You don't say what type of queue you create in Weblogic for this. For a clustered environment, it is better to use DistributedQueue rather than a standard queue. I believe this allows Weblogic to better handle the way messages are processed in the queue when one of the nodes in the cluster goes down. It is also possible to view the contents of the queue and delete messages from the Weblogic admin console.



All Articles