Configuring JMS Bridges on Weblogic Server
Step-by-step bridge setup across two WebLogic domains
Configuring JMS Bridges on Weblogic Server
Some background on JSM Bridges:
· The bridge allows you to configure a forwarding mechanism between any two messaging products (WLS-WLS-any version, WLS to any 3rd party JMS vendor, any 3rd party vendor - anyother 3rd party vendor)
· A messaging bridge connects two actual destinations that are mapped to bridge destinations: a source destination from which messages are received, and a target destination to which messages are sent.
Advantages of using a Messaging Bridge:
-
-
A messaging bridge provides high availability for remote destinations. Store and forward messaging enables a local client to produce to a local destination and have those messages automatically forwarded to the remote destination when it is available
-
This allows a local client to continue to produce messages when a remote destination is not available
-
Allowing transparency
-
Replicating a Topic
-
A messaging bridge can be used to replicate a topic, similar to using the distributed topics feature
-
WLS Bridges support these three types of QOS(Quality of Service) levels:
-
-
Exactly-once—The highest QOS guarantees that a message is sent to the remote endpoint once and only once. With Exactly-once, messages survive server crashes and network down time, while guaranteeing one occurrence of each message at the endpoint.
-
At-least-once—Guarantees that a message is sent to the remote endpoint, but with the possibility of duplicates. With At-least-once, multiple copies of a message might show up on the remote endpoint because of network failures or server crashes that occur when the message is in transit.
-
At-most-once—The lowest QOS guarantees that each message is sent to the remote endpoint only once, if at all. It does not guarantee that a message is sent to the endpoint. With At-most-once, messages may get lost because of network failures or server crashes. No duplicate messages will reach the endpoint.
-
[
](http://docs.google.com/File?id=dt75g78_312crdpwrdz_b)
Architecture for this PoC:
[
](http://docs.google.com/File?id=dt75g78_313ghqxhvwf_b)
Step by Step Instructions:
1. Create new domain named ‘LocalDomain’ with admin server listening on 7001
2. Follow the below steps to create WLS resources in the domain:
i. **Local and Edit**
ii. Create a JMS Server (LocalJMSServer)
iii. Create a new store(FileStore0)
iv. Associate JMS Server to FileStore0
v. Target to Admin Server
vi. Create a new JMS Module
vii. Deploy it to the Admin Server
viii. Create new Connection Factory (JNDI: JMS/LocalCF)
ix. Create a new source Queue (JNDI: JMS/LocalQ)
x. Click on New Sub Deployment -> name it LocalQSub -> target it to LocalJMSServer
xi. **Activate Changes**
xii. Restart for changes to come into effect
3. Create new domain named ‘RemoteDomain’ with admin server listening on 8001
4. Follow the below steps to create WLS resources in this domain:
xiii. **Local and Edit**
xiv. Create a JMS Server (RemoteJMSServer)
xv. Create a new store(FileStore0)
xvi. Associate JMS Server to FileStore0
xvii. Target to Admin Server
xviii. Create a new JMS Module
xix. Deploy it to the Admin Server
xx. Create new Connection Factory (JNDI: JMS/RemoteCF)
xxi. Create a new source Queue (JNDI: JMS/RemoteQ)
xxii. Click on New Sub Deployment -> name it RemoteQSub -> target it to RemoteJMSServer
xxiii. **Activate Changes**
xxiv. Restart for changes to come into effect
xxv. Click on Services > Messaging > Bridges > JMS Bridge Destinations
xxvi. **Local and Edit**
xxvii. Create a New JMS Bridge Destination >> Name: LocalQ >> Connection URL: t3://LocallIP:7001 >> Connection Factory JNDI Name: JMS/LocalCF >> Destination JNDI Name: JMS/LocalQ
xxviii. Create a New JMS Bridge Destination >> Name: RemoteQ >> Connection URL: t3://RemoteIP:8001 >> Connection Factory JNDI Name: JMS/RemoteCF >> Destination JNDI Name: JMS/RemoteQ
xxix. **Activate Changes**
xxx. **Local and Edit**
xxxi. Click on Services > Messaging > Bridges
xxxii. Create New JMS Bridge >> Name: JMSBridge >> Quality Of Service: Almost-once >> Check Started >> Existing Source Destination: LocalQ >> Existing Target Destination: RemoteQ >> Target it AdminServer
xxxiii. **Activate Changes**
5. Make your producer listen on t3:// LocalIP:7001 and Connection Factory: JMS.LocalCF and Destination Queue: LocalQ
6. Make your consumer listen on t3:// RemoteIP:8001 and Connection Factory: JMS.RemoteCF and Destination Queue: RemoteQ
Producer / Consumer Screenshots:
[
](http://docs.google.com/File?id=dt75g78_314grmjxzc3_b)[
](http://docs.google.com/File?id=dt75g78_315hnhvdq2z_b)
Further Reading:
· http://download.oracle.com/docs/cd/E11035_01/wls100/bridge/design.html#wp1172930
· http://download.oracle.com/docs/cd/E11035_01/wls100/bridge/bridgeTOC.html
· http://download.oracle.com/docs/cd/E11035_01/wls100/bridge/bridgefaq.html