Software AG Products 10.5 | Using API Gateway | Policies | System-defined Stages and Policies | Transport | Enable JMS/AMQP
 
Enable JMS/AMQP
 
Configuring API Gateway for JMS with AMQP Protocol
Using Enable JMS/AMQP for a SOAP API
Using Enable JMS/AMQP for a REST API
Java Message Service (JMS) is a standard Java API for communicating with message oriented middleware and enables loosely coupled communication between two or more homogenous systems. It provides reliable and asynchronous form of communication.
Advanced Message Queuing Protocol(AMQP) is an open standard application layer protocol for delivering messages. AMQP can queue and route messages in a reliable and secured way. AMQP provides a standard messaging protocol that stands across all platforms and a description on how a message should be constructed. It doesn't provide an API on how the message should be sent. AMQP being language agnostic is useful in the message oriented middleware to achieve interoperability in asynchronous way among heterogenous systems.
When you want to expose a REST or SOAP API over JMS with broker native protocol or JMS with AMQP protocol add and configure the Enable JMS/AMQP policy in API Gateway, thereby allowing them to communicate through the messaging Queue or Topic.
For example, you can use this policy to expose your API over JMS/AMQP and hence enable your client to communicate through the messaging queue or topic.
*JMS with Message broker native protocol support
For example, if your Message broker is using ActiveMQ and if you are relying on the default Active MQ TCP protocol, then essentially it is JMS on open wire protocol because open wire is the native protocol of ActiveMQ Message broker.
*JMS with AMQP protocol support
For example, if you want to use JMS with AMQP with any message broker which supports AMQP 1.0 to achieve interoperability in asynchronous way among heterogenous systems. API Gateway supports AMQP 1.0 using Apache qpid JMS client.
Note:
The following are not supported if the Enable JMS/AMQP policy is added:
*Threat protection policies.
*API Gateway SOAP to REST transformation feature.
Use case 1: Expose a SOAP API over JMS with a message broker native protocol
This describes the high level workflow for the scenario where you want to expose a SOAP API over JMS with a message broker native protocol.
1. Create an alias to a JNDI Provider. For a detailed procedure, see Creating a JNDI Provider Alias.
2. 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.
3. 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.
4. A WS (Web Service) endpoint trigger is created when you configure WS (Web Service) JMS Provider endpoint alias. This trigger consists of the input source details like Queue name or Topic name. You can update the WS (Web Service) endpoint trigger, as required. For detailed procedures, see .
5. Select the required API.
6. Click Edit.
7. In the API Details section click Policies.
8. Enforce the Enable JMS/AMQP policy with the following properties configured.
a. Specify the name of the JMS provider endpoint alias that specifies the trigger which listens to the source queue or topic for the input message.
b. Specify the SOAP version of the requests which the API Gateway accepts from the client.
For details on the Enable JMS/AMQP policy, see Using Enable JMS/AMQP for a SOAP API
9. Click Save.
The enforced policy Enable JMS/AMQP with the required configuration now allows any java client to communicate with the API asynchronously.
Use case 2: Expose a SOAP API over JMS with AMQP protocol
This describes the high level workflow for the scenario where you want to expose a SOAP API over JMS with AMQP protocol.
1. Configure API Gateway to use JMS with AMQP protocol.
Configure JNDI settings and JMS settings as per the client you are using to achieve JMS over AMQP protocol support.
Note:
For a sample procedure on configuring API Gateway to use JMS with AMQP protocol using Apache qpid libraries, see Configuring API Gateway for JMS with AMQP Protocol
2. Select the required API.
3. Click Edit.
4. In the API Details section click Policies.
5. Enforce the Enable JMS/AMQP policy with the following properties configured.
a. Specify the name of the JMS provider endpoint connection alias that specifies the trigger which listens to the source queue or topic for the input message.
b. Specify the SOAP version of the requests which the API Gateway accepts from the client.
For details on the Enable JMS/AMQP policy, see Using Enable JMS/AMQP for a SOAP API
6. Click Save.
The enforced policy Enable JMS/AMQP with the required configuration now allows all the clients such as Python, Ruby, Java, and Dotnet to communicate with the API asynchronously.
Use case 3: Expose a REST API over JMS with a message broker native protocol
This describes the high level workflow for the scenario where you want to expose a REST API over JMS with a message broker native protocol.
1. Create an alias to a JNDI Provider. For a detailed procedure, see Creating a JNDI Provider Alias.
2. 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.
3. Select the required API.
4. Click Edit.
5. In the API Details section click Policies.
6. Enforce the Enable JMS/AMQP policy with the following properties configured.
a. Specify the name of the JMS provider endpoint alias that contains the configuration information needed to establish a connection to a specific JMS provider.
b. Specify the input source name which API Gateway starts listening to when the API is activated.
c. Specify the type of source type Queue or Topic, which the API Gateway listens for the request message.
d. Specify the selector, a criteria for the API Gateway tp listen to a message containing the specified criteria
For details on the Enable JMS/AMQP policy, see Using Enable JMS/AMQP for a REST API
7. Click Save.
The enforced policy Enable JMS/AMQP with the required configuration now allows any java client to communicate with the API asynchronously.
Use case 4: Expose a REST API over JMS with AMQP protocol
This describes the high level workflow for the scenario where you want to expose a REST API over JMS with AMQP protocol.
1. Configure API Gateway to use JMS with AMQP protocol.
Configure JNDI settings and JMS settings as per the client you are using to achieve JMS over AMQP protocol support.
Note:
For a sample procedure on configuring API Gateway to use JMS with AMQP protocol using Apache qpid libraries, see Configuring API Gateway for JMS with AMQP Protocol
2. Select the required API.
3. Click Edit.
4. In the API Details section, click Policies.
5. Enforce the Enable JMS/AMQP policy with the following properties configured.
a. Specify the name of the JMS provider endpoint alias that contains the configuration information needed to establish a connection to a specific JMS provider.
b. Specify the input source name which API Gateway starts listening to when the API is activated.
c. Specify the type of source type Queue or Topic, which the API Gateway listens for the request message.
d. Specify the selector, a criteria for the API Gateway tp listen to a message containing the specified criteria
For details on the Enable JMS/AMQP policy, see Using Enable JMS/AMQP for a REST API
6. Click Save.
The enforced policy Enable JMS/AMQP with the required configuration now allows all the clients such as Python, Ruby, Java, and Dotnet to communicate with the API asynchronously.