Create or update a message queue
Purpose
Creates or updates a message queue. A queue is an object on which JMS applications can send and receive messages.
URI
Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/
Object configuration data
Provide Queue object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:
{
"Queue": {
"<NameOfQueue>": {
"Description": "string",
"AllowSend": true|false,
"ConcurrentConsumers": true|false,
"MaxMessages": integer
}
}
}
Where:- NameOfQueue
- Required.
- Description
- Specifies a description of the queue.
- AllowSend=true|false
- Specifies whether JMS applications can send messages to the queue. It does not stop applications from receiving messages from the queue.
- ConcurrentConsumers=true|false
- Specifies whether multiple consumers are allowed to use the queue at the same time.
- MaxMessages
- Specifies the maximum number of messages that can be put on the queue. This value is a guideline, rather than an absolute limit. If the system is running under stress, then the number of buffered messages on a queue might be slightly higher than the
MaxMessages
value.
Usage NotesĀ®
- Capitalization and double quotation marks must be used as shown.
Related REST Administration APIs
Example
The following example demonstrates creating a queue named testQ
by using cURL. The queue uses the default values for AllowSend
and ConcurrentConsumers
, and sets MaxMessages
to 1000:
curl -X POST\
-H 'Content-Type: application/json' \
-d '{
"Queue": {
"testQ": {
"MaxMessages": 1000
}
}
}
' \
http://127.0.0.1:9089/ima/v1/configuration/
The following shows an example response to the POST method.
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}