store and forward agents (SAF) in WLS is a mechanism by which WLS local JMS producers produces messages to remote JMS destinations. These remote JMS destination can be part of other domain/machine/cluster.
Main steps involved are
SAF agent is a component which is responsible for storing and forwarding messages between local sending and remote receiving destinations
It stores messages locally when remote destination is not reachable and forwards it when remote destination is available.
We are trying to produce JMS messages to remote destination ; hence it is required
Provide appropriate values when creating SAF agent and make sure you select 'Sending Only' for agent type field.
Create SAF remote context
SAF remote context holds connecting url and credential information to connect to remote WLS instance.
:// host:port, for example http://server1:8001
Create SAF imported destination
SAF imported destinations are collections of SAF queues and topics that locally represent JMS queues or topics on a remote server instance or cluster
Now we have to associate remote JMS destinations with SAF imported destinations
Main steps involved are
- Create SAF agent
- Create SAF remote context
- Create SAF imported destination
- Configuring SAF imported destination with remote Queues and Topics
SAF agent is a component which is responsible for storing and forwarding messages between local sending and remote receiving destinations
It stores messages locally when remote destination is not reachable and forwards it when remote destination is available.
We are trying to produce JMS messages to remote destination ; hence it is required
Provide appropriate values when creating SAF agent and make sure you select 'Sending Only' for agent type field.
Create SAF remote context
SAF remote context holds connecting url and credential information to connect to remote WLS instance.
- Login to WLS console and navigate to Services> Messaging>JMS Modules, click on required JMS module<SOAJMSModule> on which you want to create this resource
- Click New button and select 'Remote SAF Context', click Next
- Specify required information and click OK
Create SAF imported destination
SAF imported destinations are collections of SAF queues and topics that locally represent JMS queues or topics on a remote server instance or cluster
- Login to WLS console and navigate to Services> Messaging>JMS Modules, click on required JMS module<SOAJMSModule> on which you want to create this resource
- Click New button and select 'SAF Imported Destination', click Next
- Provide any valid JNDI prefix, example safjms. and select remote SAF context created in previous step,click next
- Click Advanced Targeting and select one of subdeployments from list and make sure this resource is targeted to SAF agent created in 1st step.(To understand what we are doing here you need to understand JMS sub deployment mechanism in WLS)
- Click Finish
Now we have to associate remote JMS destinations with SAF imported destinations
- Click on created SAF imported destination
- Click on either Queues or Topics tab depending on type of resource you would like to access remotely
- Provide Remote JNDI name(This should exactly match the remote JMS destination JNDI) and click OK
- Now click on newly created resource and provide any valid local JNDI name for example saf.localjndi and click Save
Note: Please use local JNDI prefix + local JNDI name to produce messages locally, in our case it becomes safjms.saf.localjndi. To consume messages consumer has to use remote JNDI.
I have few queries on SAF configuration,I have two domains at my end.
ReplyDelete1>Do i need to create SAF JMS Resources in both the domains?
2>While creating remote SAF context do i need to specify the url of remote managed server?
3>While configuring SAF imported destination with remote Queue
you mentioned
# Provide Remote JNDI name(This should exactly match the remote JMS destination JNDI) and click OK
Here what do you mean by remote destination?is it a queue or a connection factory for other domain or of the same domain?
Further you have mentioned
Note: Please use local JNDI prefix + local JNDI name to produce messages locally, in our case it becomes safjms.saf.localjndi. To consume messages consumer has to use remote JNDI.
If i am using Jdeveloper how will i use local JNDI prefix + local JNDI name to produce messages locally?