Contents

The JMS Replier component is used to retrieve messages from a JMS Topic / Queue and send the response to a configured destination after the message is processed by the flow. Using the CPS, the topic or queue from where the message is to be retrieved can be specified. The message received from the destination should have a JMSReplyTo destination set in the JMS message header properties; else the message cannot be processed by JMS Replier. The JMS Replier component sends the JMS message received from a Topic / Queue to another component.

After the message is processed by the downstream components, the JMS message should return to the Input Port of the JMSReplier which sends the processed message to the JMSReplyTo destination set in the JMS message header properties. In case an error occurs while processing the message, the message is sent to the error destination. In case the error destination is not provided, then the message is send to the JMSReplyTo destination set in the JMS message header properties (which may be a temporary destination).
This component can be used to receive Text, Byte or Map messages.

Icon

The only restriction on Map Messages is that this component does not support Objects in Map Messages.

Configuration and Testing

Configure Component


Figure 1: Separate process CPS of JMSReplier

General Configuration

JMS Implementation

The JMS providers supported are Fiorano MQ and JBoss.

For the proper working of the JBoss JMS provider, the following jars should be explicitly added as resources to the component:

JBoss:

  • %JBOSS_HOME%\client\jnp-client.jar
  • %JBOSS_HOME%\client\jboss-common-client.jar
  • %JBOSS_HOME%\client\jbossmq-client.jar
  • %JBOSS_HOME%\client\jboss-client.jar

JBOSS6.0.0:

Along with the JBoss jars mentioned above, add the below jars as well:

  • hornetq-core-2.2.13.Final.jar
  • hornetq-jms-2.2.13.Final.jar
  • hornetq-ra-2.2.13.Final.jar
  • jboss-as-build-config.jar
  • jboss-ejb-api_3.1_spec.jar
  • jboss-ejb-client.jar
  • jboss-logging.jar
  • jboss-marshalling.jar
  • jboss-marshalling-river.jar
  • jboss-remote-naming.jar
  • jboss-remoting.jar
  • jboss-sasl.jar
  • jboss-transaction-api_1.1_spec.jar
  • jgroups.jar
  • netty.jar
  • xnio-api.jar
  • xnio-nio.jar
Icon

If these jars are added to resources of the System library JMSAdapters, the jars are available for all JMS components. Refer to the Adding Resources To a Microservice section to perform this action.

Connection Configuration

Please refer to the respective section in JMSIn4.0 page.

Proxy Settings

Please refer to the respective section in JMSIn4.0 page.

Context / JNDI

JNDI details

The initial context is typically used as a starting point.

Initial Context Properties can be used for creating an initial context. For instance, if JMSReplierService has to connect to FMQ Server using HTTP protocol instead of the default TCP protocol, we can set the property 'TronsportProtocol' with the value 'HTTP'.

In the simplest case, an initial context must be created using the specific implementation and extra parameters required by the implementation. The initial context will be used to look up a name. It is analogous to the root or top of a directory tree for a file system.

Please refer to the JNDI Settings section in JMSIn4.0 page for the descriptions.

JMS Properties

ClientID

Client identifier for the connection.

Destination Configuration

Please refer to the respective section in JMSIn4.0 page for the information.

Message Selector

The message selector for the messages to be received by the consumer.
Name of the topic or queue to subscribe to.

IsDurableSubscriber

This property is used to create a durable subscription when the destination type is Topic.

Default JMSReplyTo Destination Type
  • Topic
  • Queue
Default JMSReplyTo Destination

If the message does not contain a JMSReply to destination then this will be used. It will not use the AutoCreate Destination and other properties. It first does the lookup and if it fails then it creates the destination.

Delay

Time in milliseconds the component will wait before accepting the second request.

Retain Application Context

Specifies whether the application context has to be retained or not.

Session Configuration

Acknowledge Mode

Please refer the respective section in JMSIn4.0 page for the information.

  • Auto Acknowledge
  • Client Acknowledge
  • Dups Ok Acknowledge
Message Ack Count

Number of successfully processed messages after which message is acknowledged in clientAckMode.

Message configuration

Input Message Configuration

For Input Message Configuration and Output Message Configuration, please refer the Message Type configuration section in JMSIn4.0 page.

Message Properties

Producer Configuration

Please refer the respective section in JMSIn4.0 page for the information. 

Expert Properties

If Expert Properties are enabled (Show Expert Properties check box is selected), the below properties will be visible for configuration:

  • SSL Security
  • Elements to Decrypt
  • Elements to Encrypt

Please refer the respective section in Common Configurations page for more information.

Secured Connections to Fiorano MQ (SSL)

If Fiorano MQ server uses SSL then, provide the following properties in Initial Context Properties:

  • java.naming.security.protocol
    Name of the security protocol used to create secure connections with the MQ server.
    Valid value: The possible values that this variable can take are PHAOS_SSL and SUN_SSL.
  • SecurityManager(optional)
    The Security Manager implementation used to create secure connections [HTTPS or SSL] with the MQ server. The manager class should be an implementation of the fiorano.jms.runtime.IFMQSecurityManager interface provided by FioranoMQ. 
    Valid value: Qualified class name of security Manager class.

    Icon

    If this property is not provided then, default security provider will be used. 

Error Handling Configuration

Error Destination Type

To specify the destination; choose from the options Topic and Queue.

Error Destination

Destination to which response is send in case of error.

This is an optional configuration; in case a value is not specified, then error messages are send to JMSReplyTo destination set in the incoming Message Header properties.

Number of Retries

Number of retries in case of Connection Error.

Retry Interval

Time interval between tries (milli seconds) in case of Connection Error.

Functional Demonstration

Scenario

Sending a request from JMSRequestor4.0 to the JMSReplier in plain text format;if successful, the plain text message gets processed as output from JMSReplier back to JMSRequestor. 

Icon

All the mappings if required are to be done in the Mapper Perspective project of the Replier.

Configure both the components as described in the Configuration and Testing section above and use Feeder and Display components to send sample input and check the response respectively.


Figure 2: Event Process demonstrating JMSRequestor and JMSReplier functionalities

Sample Input

Below is the sample generated from the Feeder.

Output

After running the Event Process, output will be displayed in the Display component if the message is successfully sent.


Figure 3: Output as seen in the Display component window

Output copied from Display component  Expand source
Adaptavist ThemeBuilder EngineAtlassian Confluence