API Management 10.4 | Using API Gateway | Policies | System-defined Stages and Policies | Routing | JMS/AMQP Policies | Using JMS/AMQP Policy for a SOAP API
 
Using JMS/AMQP Policy for a SOAP API
If you are using JMS with Message broker native protocol support ensure that following actions are performed before using the Enable JMS/AMQP policy:
*Create an alias to a JNDI Provider For a detailed procedure, see Creating a JNDI Provider Alias.
*Configure API Gateway to use a JMS connection alias to establish an active connection between API Gateway and the JMS provider. For a detailed procedure, see Creating a JMS Connection Alias.
*Create a WS (Web Service) JMS Provider endpoint alias and configure the Alias, Description, Type (Provider), Transport Type (JMS) fields and JMS Transport Properties. For a detailed procedure, see Creating an Endpoint Alias for a Provider Web Service Descriptor.
*Configure a WS (Web Service) endpoint trigger. For detailed procedures, see .
If you are using JMS with AMQP protocol support, ensure the following before using the Enable JMS/AMQP policy:
*You have configured API Gateway for JMS with AMQP. For details, see Configuring API Gateway for JMS with AMQP Protocol
The table lists the properties that you can specify for this policy:
Parameter
Description
Connection URL
Provide a connection alias for connecting to the JMS provider (for example, an Integration Server alias or a JNDI URL). The connection URL contains various elements that construct the destination and other connection specific parameters. The structure of the connection URL is: <protocol>:<lookupVariant>:<destination>?<parameters> where
*protocol. Specify the name of the transport protocol. The default value is JMS.
*lookupVariant. Specify the destination type such as queue or topic. The default value is queue.
*destination. Specify the destination name of the JMS Provider. For dynamic queue the destination name is: dynamicQueues/<Queue name>
*Parameters
*wm-wsendpointalias. Specify the JMS consumer endpoint alias. This parameter is required for API Gateway to look up the JMS consumer alias and send the request to the specified queue.
*jndiInitialContextFactory. Specify the initial context factory for the JNDI look up. For example: org.apache.activemq.jndi.ActiveMQInitialContextFactory for ActiveMQ
*jndiConnectionFactoryName. Specify the connection factory look up name. For example:
*ConnectionFactory for ActiveMQ if you are using the JMS with broker native protocol.
*qpidConnectionFactory for ActiveMQ if you are using the JMS with AMQP protocol.
*jndiURL. Specify the Provider URL for the Active MQ to connect to API Gateway. For example:
*tcp://vmmeddemo03:61616 for ActiveMQ if you are using the JMS with broker native protocol.
*The file path location of the properties file, for example, Install directory\IntegrationServer\lib\jars\amqp.properties if you are using JMS with AMQP protocol.
*targetService. Specify the API Gateway API name. This parameter is required if you are sending the request to another API in API Gateway that uses JMS as the entry protocol.
Sample: With consumer endpoint alias
jms:queue:dynamicQueues/MyTestQueue?
wm-wsendpointalias=JMSConsumerEndpointAlias&target
Service=EchoS_VS_JMS_IN
Sample: With JNDI lookup parameters
jms:queue:dynamicQueues/MyTestQueue?
jndiConnectionFactoryName=ConnectionFactory
&jndiInitialContextFactory=org.apache.
activemq.jndi.ActiveMQInitialContextFactory
&targetService=EchoS_VS_JMS_IN
Sample: With JNDI lookup parameters for AMQP protocol
jms:queue:dynamicQueues/MyTestQueue?
jndiConnectionFactoryName=qpidConnectionFactory
&jndiInitialContextFactory=org.apache.qpid.jms.
jndi.JmsInitialContextFactory
&targetService=EchoS_VS_JMS_IN
Reply To Destination
Specify a queue name where a reply to the message must be sent.
Priority
Type an integer that represents the priority of this JMS or AMQP message with respect to other messages that are in the same queue. The priority value determines the order in which the messages are routed. The lowest priority value is 0 and the highest priority value is 9. The messages with this priority value are executed first.
*Priority values 0 through 9.
*The default priority for a JMS or AMQP message is 0.
Time to Live (ms)
Provide a numeric value that specifies the expiration time (in milliseconds) of the JMS or AMQP message.
If the time-to-live is specified as zero, expiration is set to zero which indicates the message does not expire.
The default value is 0.
Delivery Mode
The message delivery mode for the request message. This is the delivery mode that web service clients must specify in the JMS or AMQP message that serves as the request message for the web service. The available options are:
*Non-persistent. Indicates that the request message is not persistent. The message might be lost if the JMS provider fails.
*Persistent. Indicates that the request message should be persistent. The message is not lost if the JMS provider fails.

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release