Anypoint MQ Broker

(1 review)

home

The Anypoint MQ Broker API acts as the message broker for Anypoint MQ. For more information, see Anypoint MQ.

More Info

The Anypoint MQ Broker API allows clients to send and receive messages from queues and exchanges. Before using this API, you should be familiar with Anypoint MQ. See About Anypoint MQ for more information.

This API is designed to be used in conjunction with the following:

To access this API, you must create a client using the Anypoint MQ UI inside the Anypoint Platform, or call the MQ Admin API directly. Then, you can authenticate using this client's ID and secret using Anypoint Access Management.

Getting Started

The following example shows how to retrieve messages from a queue. Explanations for the variables used are as follows:

  • The Authorization header includes the client bearer token obtained from Anypoint Access Management.
  • ORG_ID is the ID of the business group where your queue resides
  • ENV_ID is the ID of the environment where your queue resides
  • REGION_ID is the region where your queue resides (i.e. us-east-1)
Request:

curl -X GET \
-H 'Authorization: Bearer xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx' \
https://mq-${REGION_ID}.anypoint.mulesoft.com/api/v1/organizations/${ORG_ID}/environments/${ENV_ID}/destinations/orders-received/messages?batchSize=10

Response:

[
  {
    "properties": {
      "contentType": "text/plain; charset=UTF-8"
    },
    "headers": {
      "messageId": "724b2602-c601-4325-860e-cfd3163d63b7",
      "lockId": "AEFHCHgidF8lGkNG3CzhmY8CAun7YmqYG5RyfczR0iKBc4dpKxOWEYa4hFzwK+pwjwh6ExsF0M1sRC26nednKp79ycD4Tv+rAWcJQKSWf4d3euBc/w5kvuos0jDAQ12MXL41bs7LRtU+mSSFNwHpP7WEgu3lZgr9mYKpJFn6Wz3OuiNBkRgzQaux/lnZjB+GGUldZKjlawGRlu0I5WCujxWqv+18tlhQWR0PgGv3BJPVQcwdeWe1L4Kcqm8PkO3/LRWiNAPxrEnFJfn9vHHrc8vhlIEbXUm2H0oT1P6ED/CzgdxAxcE0dcP8BVHmYd8Z/034jgqLMDBEMv1gtO4NlS4EtNAV0e4vssyCe6xJdKTh46ITORqpZDKHyVxnapRBEHSBU7i32q8mu8h0N5AbdkHVZrsd+nugobGwKSE59Pk/SkI=",
      "created": "Thu, 25 Jan 2018 00:24:08 GMT",
      "deliveryCount": "2"
    },
    "body": "order 1 widget"
  }
]

Support

Support for this API is provided through the Anypoint Platform Support portal.


Reviews