[V9.1.0 Jul 2018]

Messaging using the REST API

You can use the messaging REST API to perform simple point-to-point and publish messaging. You can publish messages to a topic, send messages to a queue, browse messages on a queue, and destructively get messages from a queue. Information is sent to, and received from, the messaging REST API in plain text format.

Before you begin

  • The messaging REST API is enabled by default. You can disable the messaging REST API to prevent all messaging. For more information about enabling or disabling the messaging REST API, see Configuring the messaging REST API.
  • The messaging REST API is integrated with IBM® MQ security. To use the messaging REST API, users must be authenticated to the mqweb server and must be a member of the MQWebUser role. The user must also be authorized to access the specified queueor topic. For more information about security for the REST API, see IBM MQ Console and REST API security.
  • If you use Advanced Message Security (AMS) with the messaging REST API, note that all messages are encrypted by using the context of the mqweb server, not the context of the user that posts the message.
  • When receiving or browsing a message only IBM MQ MQSTR formatted messages are supported. Subsequently, all messages are destructively received under sync-point and any unhandled messages are left on the queue. The IBM MQ queue can be configured to move these poison messages to an alternate destination. For further information, see Handling poison messages in IBM MQ classes for JMS.
  • The messaging REST API does not give you once-and-once only delivery of messages with transactional support. If an HTTP POST is issued and the connection fails before an HTTP response is received by the client, the client can not immediately tell if the message was sent to the specified queue, or published to the specified topic. If an HTTP DELETE is issued and the connection fails before an HTTP response is received by the client, then a message might have been destructively got from the queue and lost, as there is no way of rolling the destructive get back.
  • Newlines in incoming strings are stripped out on the HTTP POST operation. REST applications

    should not use newlines in messages that are sent or published using the REST API, as they will be lost.