Software AG Products 10.7 | Using API Gateway | Policies | System-defined Stages and Policies | Transport | Enable JMS/AMQP | Using Enable JMS/AMQP for a REST API
 
Using Enable JMS/AMQP for a REST API
This policy is used to expose a REST API over JMS/AMQP. A REST API can be exposed as both HTTP/HTTPS and JMS/AMQP at the same time.
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.
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:
Property
Description
Connection Alias Name
Specifies the name of the connection alias.
Each connection alias contains the configuration information needed to establish a connection to a specific JMS provider.
Add JMS/AMQP source details. Click to add the JMS/AMQP source details and provide the required information.
Input Source Name
Specifies the input source name which API Gateway starts listening to when the API is activated.
Input Source Type
Specifies the type of source to which the API Gateway listens for the request message.
Select one of the following source type:
*QUEUE. Indicates that API Gateway listens to the specified queue for the request message.
*TOPIC. Indicates that the API Gateway listens to the specified topic for the request message.
Note:
Provides support only for non-durable topic.
Selector
Specifies the criteria for the API Gateway to listen to a message containing the specified criteria.
For example, operation = GET
If you have multiple selectors it follows the OR condition.
If there are no selectors the message that comes in is listened to without any condition.
Note:
Message selectors are only applicable for headers, properties and not for payload.
Resource
Specifies the resource of the API.
HTTP Method
Specifies the routing method used.
Available routing methods: GET, POST, PUT, and DELETE.
Content Type
Optional. Specifies the content type of the JMS/AMQP message body.
Examples for content types: application/json, application/xml
Note:
Alternatively, you can use the Set Media Type policy to set the default content type instead of setting it here.