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 also configure queues in PubSub+ Event Portal and push the updates to an event broker if runtime configuration is enabled. For more information, see Configuring Event Brokers in Event Portal.

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 PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Queues in the left navigation bar.
  4. Click + Queue.

    Screenshot showing the options described in the surrounding text.

  5. Enter a name for the queue and click Create.
  6. 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 spool, in megabytes, that the queue may use. Setting the messages queued quota to 0 enables the last value queue feature and disables endpoint quota checking. A value of 0 only allows spooling of the last message received by deleting older messages from the endpoint upon receiving new messages. If the queue is partitioned, each of its partitions holds the last message spooled to that partition. For more information, see Last Value Queues.

    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. Client access to the durable message queue must first be disabled before assigning an owner.

    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.

  7. (Optional) Click Show Advanced Settings, and set any additional options for your queue. For more information, see Configuring Advanced Queue Options.
  8. Click Apply.

Adding a Subscription to a Queue

Subscriptions define the topics that queues receive messages for. Queues can have multiple topic subscriptions that attract published events. For more information, see Understanding Topics

Event brokers also support negative subscriptions, which exclude the specified topic from the larger subscription set. You can create a subscription exception by adding an exclamation mark ! to the beginning of the subscription. For more information, see Subscription Exceptions

To add one or more topic subscriptions to a queue, perform these steps: 

  1. Open Broker Manager. For instructions, see PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Queues in the left navigation bar.
  4. Click the name of the queue.
  5. Click the Subscriptions tab.
  6. Click + Subscription.
  7. Enter the topics that you want to add subscriptions for.
  8. Click Create.
  9. The subscriptions are added to the queue.

Configuring Advanced Queue Options

Queues have advanced settings that define how the queue behaves in certain situations. These options include:

Setting Description

Messages Queued Quota

Specifies the maximum amount of message spool, in megabytes, that the queue may use. Setting the messages queued quota to 0 enables the last value queue feature and disables endpoint quota checking. Global quota checking and Message VPN quota checking are unaffected. A value of 0 only allows spooling of the last message received by deleting older messages from the endpoint upon receiving new messages. If the queue is partitioned, each of its partitions holds the last message spooled to that partition. For more information, see Last Value Queues.

  • Alert Thresholds—Specifies the thresholds that control when message spool-related events are generated for 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. Client access to the durable message queue must first be disabled before assigning an owner.

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 amount of consumer flows that can bind to the queue.

  • Alert Thresholds—Specifies the thresholds that control when consumer flow alerts are generated for the queue.

Maximum Message Size

Specifies the maximum message size, in bytes, for the queue.

Maximum Delivered Unacknowledged Messages per Flow

Specifies the maximum number of messages delivered but not acknowledged per flow for the queue. After this maximum number of delivered unacknowledged messages is exceeded, the event broker stops delivering messages to the client on the flow until the client acknowledges messages that are already delivered.

DMQ Name

The name of the dead message queue (DMQ) used by this queue. The default is #DEAD_MSG_QUEUE. Solace recommends using a separate DMQ for each queue and topic endpoint that requires one and setting the DMQ name to the name of the queue, followed by "_dmq", for example MyQueue_dmq.

A DMQ collects undelivered messages that would otherwise be discarded from the queue because the Maximum TTL or Maximum Redelivery Count has been reached.

Messages are sent to a DMQ only if the publisher specifies that the message is DMQ-eligible and if a queue with the specified DMQ name exists on the same Message VPN. For more information, see Configuring Dead Message Queues.

Enable Client Delivery Count

Specifies whether client applications can query the message delivery count of messages received from the queue.

Enabling client delivery count is a Controlled Availability (CA) feature. Please contact Solace to find out if this feature is supported for your use case.

Delivery Delay

Specifies the number of seconds of delay between the message arriving in the queue and being sent to the consumer. For more information, see Delayed Delivery. The default is 0, or no delay.

Respect Message Priority

Specifies whether the queue supports priority message delivery and delivers higher priority messages first. For more information, see Message Priority.

Message Expiry

Specifies whether messages that have not been delivered to the consumer expire at the end of the message time-to-live (TTL). If a message is not consumed and its TTL time is reached, the message is discarded or moved to a dead message queue (DMQ). Message expiry has two settings:

  • Respect TTL—Specifies whether the queue acts on TTL values set for either the queue or by the message publisher.

  • Maximum TTL—Specifies the TTL that the queue applies to messages when the message arrives in the queue. A value of 0 means that the queue does not impose a limit.

Messages can also have a publisher-supplied TTL, which indicates how long the publisher considers a message to be valid. This differs from the maximum TTL for the endpoint in that the publisher TTL expiration starts when a message is published and counts down as the message passes through the network. If a message has both a publisher-assigned TTL and an endpoint-assigned maximum TTL, the event broker uses the minimum of the two TTL values when the message is in the endpoint.

Redelivery

Specifies the options for message redelivery attempts if the message is not delivered to the consumer on the first attempt.

Disabling message redelivery and enabling delayed redelivery are Controlled Availability (CA) features. Please contact Solace to find out if those feature are supported for your use case.

Redelivery has the following settings:

  • Try Forever—Specifies that the queue attempts to deliver the message to the consumer until delivery is successful. This is the default.

  • Maximum Redelivery Count—Specifies the maximum number of times the queue attempts to deliver the message to the consumer. This value is respected only if Try Forever is not selected. If the message is not delivered successfully after the specified number of attempts, the message is discarded or is moved to a dead message queue (DMQ).

  • Delayed Redelivery—Specifies whether the queue waits between message redelivery attempts. This option is disabled by default.

  • Multiplier—If Delayed Redelivery is selected, specifies the multiplier for each subsequent delay. For example, if the Initial Delay is 1000 milliseconds (one second), and the multiplier is 2.00, the queue waits for two second before the second redelivery attempt, four seconds, before the following attempt, and so on until the Maximum Delay is reached. You can set a value between 1.00 and 5.00.

  • Initial Delay—If Delayed Redelivery is selected, specifies the delay in milliseconds before the first redelivery attempt. The default is 1000 milliseconds (one second).

  • Maximum Delay—If Delayed Redelivery is selected and the Multiplier is set to a value greater than 1.00, specifies the maximum delay in milliseconds.

Reject Messages to Sender on Discard

Specifies when and how negative acknowledgments are returned to the sending client on message discards.

  • Silent—Silently discards messages.

  • Notify-Sender—Negatively acknowledge the message discard back to the client, except for messages that are discarded because a queue is disabled.

  • Notify-Sender-Include-Shutdown—Negatively acknowledge the message discard back to the client, including messages that are discarded because a queue is disabled.

Reject Low Priority Messages

Specifies whether low priority messages are discarded to protect against congestion scenarios. When enabled, low priority messages are checked against the reject low priority messages limit. The queue can selectively discard low priority messages only after the total number of spooled low priority and high priority messages exceed the value set for the reject low priority messages limit . Before enabling it is recommended that the reject low priority messages limit has a non-zero value to avoid inadvertently discarding all low priority messages.

Reject Low Priority Messages Limit

Specifies the limit above which low priority messages are not admitted but higher priority messages are allowed. Before enabling it is recommended that the reject low priority messages limit has a non-zero value to avoid inadvertently discarding all low priority messages.

  • Alert Thresholds—Specifies the thresholds that control when the maximum allowed number of priority messages queued alerts are generated for the queue.

Consumer Acknowledgment Propagation

Specifies whether consumer acknowledgments received on the active replication Message VPN propagate to the standby replication Message VPN. Bridges cannot bind to queues configured with consumer acknowledgment propagation.

To configure advanced queue settings perform these steps:

  1. Open Broker Manager. For instructions, see PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Queues in the left navigation bar.
  4. Click the name of the queue.

  5. Click Edit .

    Screenshot showing the options described in the surrounding text.

  6. Click Show Advanced Settings.

    Screenshot showing the options described in the surrounding text.

  7. (Optional) To set a delivery delay, enter a value in the Delivery Delay (sec) field.
  8. Configure the settings required for your use case.
  9. When you have finished configuring the queue, click Apply.