Delivering Events in TAFJ
Choose one of the following methods to configure the delivery of events in TAFJ.
Delivering Events to the Default Queue
Follow the steps below to deliver events to default queue.
- Create the queue in JBoss.
- Specify the queue name in the DESTINATION.STATIC property.
- Start the Integration service to get the events delivered to this queue.You can provide the queue name with connection factory like queueName#connectionFactory.
Delivering Messages to a Specific Queue
Follow the steps below to deliver messages to a specific queue.
- Configure EVENT.TYPE.DEST with the event type and EVENT.DEST with the queue name.
- Ensure that these queues are available in the application server.
- Execute the Integration Service to get the message delivered to the queue.When FILTER.TYPE is selected as WHITE.LIST the events type mentioned only in EVENT.TYPE.DEST will be ignored.
Delivering Messages to a Common Queue
Follow the steps below to deliver messages to a common queue.
- Ensure that the queue name specified in DESTINATION.STATIC is available in your application server.
- Execute the Integration Service to get the message delivered to the queue.
Delivering Messages to Multiple Queues Based on the DESTINATION.PROP Setting
Follow the steps below to deliver messages to multiple queues.
- Set Destination Prop to any of the XML element names like the one shown below.
- Define queues for each of the values that the element specified in the Destination Prop field can have in the application configuration file. In the above configuration record the Destination Prop value is application, the common value that holds the name of the application that triggered the event. The values could be CUSTOMER, ACCOUNT etc. Hence one queue per application needs to be defined in the application server and the queues. Step 3 explains the configuration in detail.
- Configure logical queues.
In order to use logical queue names to perform event delivery, the logical queue name needs to be mapped to the physical queue name in ejb-jar.xml and jboss.xml of TAFJJEE_MDB.jar. You must do the mapping of logical name to JNDI name for the TAFJPhantomListener MDB because the program is executed as a servlet.
- Define the queue in application server. Here, it is JBoss EAP 7.
- Configure TAFJEE_MDB.jar for logical queues: specify the virtual queues names in ejb-jar.xml.
- Map the virtual queue to the physical queue in jboss3.xml.
Here, the virtual queue name (provided in res-ref-name) used jms/ACCOUNT and is based on the example Integration Service Param configuration. It could be jms/CUSTOMER, jms/SECTOT etc. In general, the virtual queue name should follow the format below:
jms/A_value_that_the_DESTINATION.PROP_field_can_hold
The physical queue name is mentioned in jndi-name and it should be the queue that is already defined in the application server. Here it is t24ACCQueue.
- Define the queue in application server. Here, it is JBoss EAP 7.
- Configure TAFJEE_MDB.jar for logical queues as shown below.
- Specify the virtual queues names in ejb-jar.xml.
- Map the virtual queue to the physical queue in jboss3.xml.
In steps 4 a and 4 b ACCOUNT is used as the queue name. The res-ref-name should be jms/A_value_that_the_DESTINATION.PROP_field_can_hold.
- After this setup all the events that are triggered for a transaction in the ACCOUNT table will be delivered to the t24ACCQueue queue. The rest of the events will not be delivered as no mapping is done for other applications and application is one of the elements that any event will hold. You should take a great care when you configure the Destination Prop field.
Delivering Messages Based on Projects
The project name of the events present in IF.EVENTS.INTERFACE.TABLE are configured with the required destination queue name for those events in the project destination.
The events present in IF.EVENTS.INTERFACE.TABLE are configured with the required project and queue name.
To configure,
- Go to IF.INTEGRATION.SERVICE.PARAM.
- Edit the SYSTEM record.
- Enter Project Name and the required queue name in Project Destination.
Guard Queues in TAFJ
You implement Guard Queue when you use TAFJ to ensure that events are delivered to a queue only once.
To use the guard queue functionality the value in Destination Static or Event Dest need to be provided as queue_name#connection_factory#guarded_queue_name. As the field size is limited to 65, these two fields are modified as multi value fields where each of the # separated values can be provided as a multi value field and it will be VM Separated. There is no validation of the data in this field, but a wrong configuration will not deliver the events to the queue. Also, a new field TIME.TO.LIVE is introduced to specify how long the correlation ID is to be stored in guard queue to avoid a duplicate message. An empty value in this field means that the correlation IDs need to be removed manually from the queue. The value of this field is in milliseconds.
In this topic