Create two Domain1 and Domain2. Domain1 will be configured with SAF agent where as Domain2 will be configured with destinations where the consumer will listen to receive and process messages.
Domain2 configuration
- Create JDBC data store
- Create Persistent store based on the above JDBC data source
- Create a new JMS server based on this JDBC persistent store
- Create a new JMS module
- Create a new Subdeployment for this JMS module and choose the JMS server created above
- Create a new Connection factory
- Create a new Queue and configure this to use the subdeployment
Domain1 configuration
- Create File based persistent store
- Create a new JMS server based on this JDBC persistent store
- Create a new Store-And-Forward agent.
- Since we are using JMS, this can only be a "Send-only" agent.
- Also make sure "Logging enabled" option is selected. This allows the message to be logged in the server log file
- Create a new JMS module
- Create "Remote SAF Context" resource
- select the name of the remote SAF context
- provide the URL context for the SAF agent to login. This will be pointing to domain2 we created above.
- provide the credentials to logon to the aboe domain
- Create "SAF Error Handling" resource
- choose the name
- set Message Handling Policy to "Always-forward" since we are neither interested in discarding any messages nor re-directing them to error destination
- Create a new Connection factory
- Create a new "SAF Imported Destinations" resource in the JMS module
- select Remote SAF Context created above
- select SAF Error Handling resource created in previous step
- After creating the "SAF Imported Destinations" and saving the
configuration, create required SAF destinations for the remote
destinations
- create a new Queue
- choose Queue name
- choose Remote JNDI name. This will be the destination JNDI name configured in Domain2
- Save the Queue
- Select the Queue and provide "Local JNDI Name". This will be used by the publisher to publish any messages to this destination
.