Configuring Queues

A queue on an event broker acts as both a destination that clients can publish messages to and as an endpoint that clients can consume messages from. Queues may be used in a point-to-point (PTP) messaging environment, and they can have topic subscriptions so that messages published to matching topics are delivered to the queue. For general information about queues, see Topic Endpoints and Queues, and for in-depth information, see Queues.

You can divide queues into partitions to ensure that messages with similar contexts are always processed by the same consumer in an environment using dynamic microservices. For more information, see Configuring Partitioned Queues.

This topic includes the following tasks: 

Creating a Queue

To create a queue using PubSub+ Broker Manager, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Queues in the left navigation bar.
  3. Click + Queue.

    Screenshot showing the options described in the surrounding text.

  4. Enter a name for the queue and click Create.
  5. Set the following options for the queue:

    Setting Description

    Incoming

    Specifies whether messages can be written to the queue.

    Outgoing

    Specifies whether messages can be consumed from the queue.

    Access Type

    Specifies how messages are delivered when multiple consumer flows are bound to the queue.

    • Exclusive specifies that only one consumer can receive a message at any one time, while additional consumers may be connected as standby. Only the first consumer to bind can receive messages. If the first consumer disconnects, the second consumer receives data, and so on. Exclusive queues always deliver messages in the order they are received.
    • Non-Exclusive specifies that multiple consumers can bind to the queue, which enables load balancing and consumer auto-scaling. A non-exclusive queue can be non-partitioned or partitioned.
      • For a non-partitioned queue (partition count is zero), each consumer is serviced in a round-robin fashion. If a connection fails, unacknowledged messages are delivered to another consumer with the re-delivered flag set. In this way, messages can be delivered to consumers out of order.
      • For a partitioned queue (partition count is greater than zero), each consumer is delivered messages from one or more partitions. Messages are mapped to partitions based on a hash of the partition key, which is set by the publishing application. Message order is maintained within a partition, but not between partitions.
    Partition Count

    Specifies the number of partitions for the queue. For more information, see Configuring Partitioned Queues.

    This setting is available only for event broker services version 10.4 and later when the Access Type is set to Non-Exclusive.

    Messages Queued Quota

    Specifies the maximum amount of message data, in MB, that can be spooled in the queue.

    Owner

    The queue owner has full unlimited permissions for the queue. The owner can consume, delete, or modify topics in the queue. By default, users with access to PubSub+ Broker Manager have ownership privileges. You can also give ownership to client applications.

    Non-Owner Permission

    Specifies the access level given to client applications other than the queue owner:

    • No Access—Disallows all access.

    • Read Only—Clients have read-only access to messages spooled to the queue.

    • Consume—Clients can consume and delete messages from the queue.

    • Modify Topic—Clients can consume and delete messages and modify the topic or selector assigned to the queue.

    • Delete—Clients can consume and delete messages, modify the topic or selector assigned to the queue, and delete the queue.

    Maximum Consumer Count

    Specifies the maximum number of consumer flows that can bind to the queue.

  6. Click Apply.

Adding a Subscription to a Queue

Subscriptions define the topics that queues receive messages for. Queues can have multiple topic subscriptions. To add one or more topic subscriptions to a queue, perform these steps: 

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Click on the name of the queue.
  3. Click the Subscriptions tab.
  4. Click + Subscription.
  5. Enter the topics that you want to add subscriptions for.
  6. Click Create.
  7. The subscriptions are added to the queue.