Skip to main content
Feedback

Event Streams Consume REST API

The Event Streams Consume REST API lets applications retrieve messages from a subscription over HTTP, without a native Pulsar client. Each subscription exposes two endpoints: one for retrieving a single message, and one for retrieving a batch. Messages are acknowledged automatically once delivered — there is no manual-acknowledge mode. If a response fails to send, the message stays unacknowledged and is redelivered in order on the next request. This means delivery is at-least-once, so your client should manage occasional duplicates.

Single message

GET /rest/consume/{tenant}/{namespace}/{topic}/{subscription} returns exactly one message. The payload is returned as raw bytes in the response body — no encoding or decoding required, and all payload formats are supported, including binary. Message metadata (message ID, key, properties) is returned in x-msg-* response headers. Returns 204 when no message is available.

Single Message dialog box

Batch

GET /rest/consume/batch/{tenant}/{namespace}/{topic}/{subscription} returns up to max_messages messages as a JSON array, with each payload returned as a plain string. This endpoint does not support binary payloads (PDF, images, video) — use the single message endpoint for binary content. Returns 200 with an empty array when no messages are available.

Batch consume dialog box

Getting started

To use the Consume REST API in Event Streams:

  1. Log in to the Boomi Platform.
  2. Navigate to the Event Streams feature by clicking on the Event Stream tile from the dashboard.
  3. Locate and click on the Environment tab to view available environments.
  4. Drill down to the Topics table for each environment to view the specific topics associated with it.
  5. Click on any topic to access the Subscriptions under that topic.

Consume Batch subscription dialog box

Copying the consume REST API URL

Each subscription has a unique REST API that allows you to consume messages. To copy the URL:

  1. Navigate to the desired subscription within the Subscriptions table.

  2. Click the View REST link in the connections column.

  3. A side drawer opens with two tabs: Single Message and Batch.

  4. You can copy the URL directly, or configure the URL by selecting the desired query parameters:

    1. Copy the URL — Copy the URL directly from the dialog box.

    Request URL image

    1. Configure the URL with query parameters — Select the desired query parameters; your selected values are appended to the GET request URL.

    Query parameters dialog box

    Query ParameterApplies toRequiredTypeDescription
    max_messagesBatch onlyNointDefault 1, maximum 100. Maximum number of messages returned per request.
    timeout_msBothNointLong-poll timeout in milliseconds. The server holds the connection open up to this duration waiting for messages before returning empty or less than max_messages in case of Batch consuming.
    subscription_typeBothNoStringShared or Exclusive. Same as the subscription type selected in the connector operation.
  5. Click Copy URL to copy the endpoint URL for that subscription.

  6. A success message (e.g., "Copied to Clipboard") will appear, confirming the action.

Authorization

To authenticate the API request, use the Environment Token as a Bearer Token. Be sure to include the token in the Authorization header of your request as shown below.

Authorization: Bearer YOUR_ENVIRONMENT_TOKEN

Using Postman to create an example request

To use Postman to consume a message from your subscription, follow the instructions below:

  1. Open Postman and create a new GET request.
  2. Enter the copied REST API URL in the request URL field.
  3. In the Headers tab, set the following:
    • Key: Authorization
    • Value: Bearer YOUR_ENVIRONMENT_TOKEN
  4. Click Send to consume the message.

Verifying Consumed Messages on UI

Once a message has been successfully consumed, you can confirm it by checking that the Backlog size for that subscription has decreased.

  1. Return to the Event Streams feature.
  2. Select the relevant topic and subscription to verify that the backlog size has been reduced.

Backlog subscription dialog box

  1. When you check the subscription backlog, the consumed message will no longer be available there.

Subscription backlog message

  1. Additionally, after consuming a message through a REST client such as Postman, you can confirm successful consumption by checking for an HTTP 200 response code along with the message that was consumed.

Subscription message consumed confirmation

Troubleshooting

If you encounter issues while using the REST API for message consumption:

  • Check Authorization: Ensure that the Environment Token used is correct and has the necessary permissions.
On this Page