IBM WebSphere default messaging JMS Topic sender

The JMS sender caches a single connection starting with the primary topic.

When the message sending fails, the JMS sender retries to send the message a configurable number of times with a configurable delay between each attempt as defined in the Reconnect Tab of the following table. An exception is thrown if the retries are exhausted and there is no backup topic.

If a backup topic is set up, a connection is made to the backup topic. The backup topic becomes the current topic for the next message sending attempt. The sender can be configured to reconnect to the primary topic. If the primary topic is found to be working, then a switch is made so that the primary topic becomes the current topic.

Configuration properties

The following are the configuration properties of these nodes:

Table 1. WebSphere default messaging JMS Topic sender configuration properties
Property Description
Runtime Tab

You need to use the settings in this tab for the primary JMS server.

Topic Name Enter the name of the topic to which the message is sent.
Time To Live

(seconds)

Enter the time period after which the messages are to be deleted from the topic. A value of zero causes the message to never be deleted from the topic.

If this is set to a non-zero value, messages in the topic that are not consumed for the specified time interval are automatically deleted from the topic by the provider.

Provider URL Enter the provider URL of the JMS implementation used. This is the URL to use for JNDI lookups.
  • For IBM® WebSphere® Default Messaging JMS Topic, set to corbaloc::<DNS Server Name or IP Address>:<bootstrapport>.

For clustered JMS configurations, use a comma-separated value comprising the host/IP and port of each node in the cluster. For example, for IBM WebSphere Default Messaging JMS Topic, set to corbaloc::<DNS Server Name or IP Address>:<bootstrapport>,<DNS Server Name or IP Address>:<bootstrapport>.

Initial Context Factory The class name of the initial context factory. This is the starting point for the resolution of names for naming and directory operations.

Select WebSphere MQ if you are using IBM WebSphere Default Messaging JMS Topic. This sets the class name to

com.ibm.websphere.naming.
WsnInitialContextFactory
.

Connection Factory Enter the connection factory name. This is used to retrieve the connection factory from JNDI. A client uses a connection factory to create connections with a JMS provider. Enter any unique identifier for the connection factory. This name must be the same as that configured in the IBM WebSphere administration console.
Persistent Select this option if you want the messages to be persistent when dropped into the topic.
Non Persistent Select this option if you want the messages to be not persistent when dropped into the topic.
Needs compression Optional. Check this box if the message needs to be compressed before dropping into the topic.
Commit of this message depends on parent transaction Check this box if you want the message to be committed to the topic only after the service is completed.

Uncheck this box if you want the message to be committed to the topic immediately.

For example, if the ON_SUCCESS event of any standard Sterling Order Management System Software API is attached to a service in which the message is transactionally written to the topic, the message is committed to the topic only upon successful completion of the ON_SUCCESS event. The message is then rolled back from the topic if there is any error in the ON_SUCCESS event after the message is staged. However, in non-transactional mode, the message remains in the topic once it is staged and is not rolled back.

Note: If you check this box, the system synchronizes the JMS commit along with the DB commit. However, it is not a two-phase commit. Therefore, it may cause some errors, thus resulting in duplicate messages.
Enable JMS Security Check this box if you want JMS Security to be enabled. Once selected, the JMS Security Properties tab is enabled to configure destination and/or JNDI based JMS security.
Header Tab
Header Name The name of the message header. For example, APINAME.
Note: The header name must be unique. Two headers cannot have the same header name.

Choose the Create New icon to add a new header name and value.

Choose the Details icon to modify an existing header name and value.

Choose the Delete icon to delete an existing header name and value.

Header Value The value associated with the Header Name. These name-value pairs are stored as message headers and can be queried by using message selectors.

This can be set to a static value. For example, ‘createOrder' results in the message having a header APINAME='createOrder'

It can also be set to be dynamically extracted from the message using the syntax xml://<full path of the element from root>/@<attribute name>, which results in the message with a header APINAME='<value of attribute name in the XML>'.

Reconnect Tab

You need to use the settings in this tab for the backup JMS server.

Retry Interval (milliseconds) In the event that the connection to the primary JMS server is lost, enter the amount of time between attempts to re-establish contact with the primary JMS server. This parameter is used in conjunction with the Number of Retries parameter. The default value is 0 which means no delay time between retry attempts.
Number of Retries In the event that the connection to the primary JMS server is lost, enter the number of attempts to re-establish contact with the primary JMS server before failing over to the backup JMS server, if enabled, or throwing an exception. This parameter is used in conjunction with the Retry Interval parameter. The default value is 0 which means there are no retries if the connection is lost and either failover occurs, if enabled, or an exception is thrown immediately.
Use Backup JMS Check this box if you want to enable a backup JMS.

Only upon selecting this checkbox, other controls in this tab are enabled.

Provider URL Enter the backup JMS server provider URL of the JMS implementation used. This is the URL to use for JNDI lookups.
  • For IBM WebSphere Default Messaging JMS Topic, set to corbaloc::<DNS Server Name or IP Address>:<bootstrapport>

For clustered JMS configurations, use a comma-separated value comprising the host/IP and port of each node in the cluster. For example, for IBM WebSphere Default Messaging JMS Topic, set to corbaloc::<DNS Server Name or IP Address>:<bootstrapport>,<DNS Server Name or IP Address>:<bootstrapport>.

Initial Context Factory The class name of the initial context factory. This is the starting point for the resolution of names for naming and directory operations.

Select WebSphere MQ if you are using IBM WebSphere Default Messaging JMS Topic. This sets the class name to

  • com.ibm.websphere.naming.
    WsnInitialContextFactory
    .
Topic Name Enter the name of the backup topic to which the message is sent.
Connection Factory Enter the back JMS server's connection factory name. This is used to retrieve the connection factory from JNDI. A client uses a connection factory to create connections with a JMS provider. Enter any unique identifier for the connection factory. This name must be the same as that configured in the IBM WebSphere administration console.
Reconnect to Primary JMS Server Check this box if you want to reconnect to the primary JMS server after a failover to the backup JMS server has occurred. Once this checkbox is selected, enter the wait time before it reconnects.
Time Before Reconnect (seconds) Enter the maximum amount of time between attempts to re-establish contact with the primary JMS server after a failover to the backup JMS server. If contact is re-established with the primary JMS server, it reverts back to using the primary JMS server. If contact with the primary JMS server cannot be established, it continues to use the backup JMS server. The default value is 600 seconds.
JMS Security Properties Tab

This is enabled upon selecting Enable JMS Security in the runtime tab.

Note: You can override the JMS security properties specified here by defining the agent and flow authorization parameters in the <INSTALL_DIR>/properties/customer_overrides.properties file.
Destination based security Check this box if you want to provide destination based security for JMS service.
JNDI based security Check this box if you want to provide JNDI based security for JMS service.
JMS Security Parameters

For more information about application server-specific JMS security parameters, see "Setting up the JMS Security Properties" section.

Parameter Name Enter the name of the security parameter.
Parameter Value Enter the value of the security parameter.
Note: The JMS session objects can be pooled based on the service being executed. Hence, whenever the JMS sender requires a session object, the Application Platform framework tries to get a free session object from the pool. If there are no free sessions available, a new session object is created to send the message and then added to the pool. Any session object that is idle for a certain configurable period of time is closed by the framework. The yfs.jms.session.reaptime property in the yfs.properties file is used to set the JMS session reaptime. To modify this property, add an entry for it in the <INSTALL_DIR>/properties/customer_overrides.properties file.