Sending a message from a OSB business service to JMS queue is very straight forward. This will work fine in any regular environment. But the code is moved to production which is clustered , then there are few points to consider.
The normal approach to set the EndPoint URI in OSB business service is using the below format
jms://hostname:port/connectionfactoryJNDI/resourceJNDI.
But in a clustered environment there will be multiple nodes. so to which node OSB will send the message?. To which node the queue is associated? What will happen if that node is down?
To address such challenges weblogic provides the Distributed Destinations
A distributed destination is a set of destinations (queues or topics) that are accessible as a single, logical destination to a client
Applications that use distributed destinations are more highly available than applications that use simple destinations because WebLogic JMS provides load balancing and failover for member destinations of a distributed destination within a cluster. Once properly configured, your producers and consumers are able to send and receive messages through the distributed destination. WebLogic JMS then balances the messaging load across all available members of the distributed destination. When one member becomes unavailable due a server failure, traffic is then redirected toward other available destination members in the set
Creating a distributed queue is the same as normal queue and it should target on all nodes of the server
If we monitor the distributed queue it will look as shown below.
so now a distributed destination is set, how do we send the message to this distributed destination.
From OSB business service for the end point URI, provide all the nodes in the cluster as coma separated values
This will ensure it will post the message to the first node and if that failed it will try to post to the second node and so on. Complete fail over can be achieved using this approach in a clustered environment
The normal approach to set the EndPoint URI in OSB business service is using the below format
jms://hostname:port/connectionfactoryJNDI/resourceJNDI.
But in a clustered environment there will be multiple nodes. so to which node OSB will send the message?. To which node the queue is associated? What will happen if that node is down?
To address such challenges weblogic provides the Distributed Destinations
A distributed destination is a set of destinations (queues or topics) that are accessible as a single, logical destination to a client
Applications that use distributed destinations are more highly available than applications that use simple destinations because WebLogic JMS provides load balancing and failover for member destinations of a distributed destination within a cluster. Once properly configured, your producers and consumers are able to send and receive messages through the distributed destination. WebLogic JMS then balances the messaging load across all available members of the distributed destination. When one member becomes unavailable due a server failure, traffic is then redirected toward other available destination members in the set
Creating a distributed queue is the same as normal queue and it should target on all nodes of the server
If we monitor the distributed queue it will look as shown below.
so now a distributed destination is set, how do we send the message to this distributed destination.
From OSB business service for the end point URI, provide all the nodes in the cluster as coma separated values
This will ensure it will post the message to the first node and if that failed it will try to post to the second node and so on. Complete fail over can be achieved using this approach in a clustered environment
No comments:
Post a Comment