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.
Specifies a name for the queue.
The name must not have leading or trailing spaces and cannot contain control characters, commas, double quotation marks, backslashes, or equal signs. The first character must not be a number or any of the following special characters:
! # $ % & ' ( ) * + - . / : ; < > ? @
The name cannot be the same as another queue.
Description
Specifies a description of the queue.
If you do not want a description, omit "Description":"description".
AllowSend=true|false
Specifies whether JMS applications can send messages to the queue. It does not stop applications from receiving messages from the queue.
The default value is true.
ConcurrentConsumers=true|false
Specifies whether multiple consumers are allowed to use the queue at the same time.
The default value is true.
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.
This value can be any number in the range 1-20000000.
The default value is 5000.

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."
}