Skip to main content

Set Message Queue

This page shows you several ways to use a stream as a message queue.

To use a stream as a message queue:

  1. Establish a shared subscription and use the same subscription name as the other consumers.
  2. Set the receiver queue for the consumers.

When you subscribe to a stream, use the following configuration settings depending on your SDK:

// Create subscriber
stream.consumer("my-subscription", "test.macrometa.io", {
subscriptionType: Shared,
receiverQueueSize: 1000,
}