Configuring Message Replay

Message replay allows event brokers to resend messages to new or existing clients that request them, hours or sometimes days after those messages were first received by the event broker.

When you enable message replay, event brokers store persistent messages in a replay log. These messages remain in the log until the log is full, and then new messages replace the oldest messages as necessary.

Message replay is available for non-partitioned queues and topic endpoints. When you initiate a replay, you can request all messages in the replay log, all messages following a specified message ID, or all messages starting from a specified replay start time. The event broker delivers any messages held in the replay log that match any subscription on that queue or topic endpoint.

Message replay is available as a Controlled Availability (CA) feature in PubSub+ Cloud. Please contact Solace to see if this feature is suitable for your use case.

For more information about how message replay works, see Message Replay.

For general information about message replay configuration, see Message Replay Configuration.

This topic includes the following tasks:

Configuring the Replay Log

You enable message replay for a Message VPN or an event broker service by configuring a replay log. To set up a replay log, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Replay in the left navigation bar.
  3. Perform one of the following steps:
    • If no replay log exists, click Create Replay Log or, for PubSub+ Cloud accounts, contact Solace.
    • If a replay log already exists, click the Settings tab and then click Edit .
  4. Set the following options for the replay log:

    OptionDescription

    Incoming

    Specifies whether messages can be written to the replay log. To enable or disable adding messages to the replay log, click the toggle.

    Outgoing

    Specifies whether messages can be sent from the replay log. To enable or disable message replay from the replay log, click the toggle.

    Disabling this options stops message replays in progress.

    Maximum Spool Usage

    Specifies the maximum size of the replay log in MB. When the log reaches the limit, new messages replace the oldest messages as necessary. If you reduce the size when the log if full, the oldest messages are trimmed to reduce the log size.

    Topic Filter Enabled

    Specifies whether topic filtering is enabled for the replay log. Because every published message stored in the replay log consumes space on the message spool, you may want to filter the messages that are stored there.

    When this option is enabled, only messages that match the configured topic filter subscriptions are stored in the replay log. Any messages that do not match the topic filters are delivered to subscribers, but are not written to the replay log and can't be replayed at a later time.

    For more information, see Setting Topic Filter Subscriptions.

  5. Click Apply.

Viewing Replay Log Data

After you create a replay log you can view information about the log. To view log information, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Replay in the left navigation bar. The Summary page displays the size of the replay log and the current replay state.
  3. Click the Messages Logged tab to display information about the messages in the log, including the message ID, the time it was added to the log, and the size.
  4. Click the Stats tab to display additional statistics for the replay log.

Setting Topic Filter Subscriptions

You can use topic filter subscriptions to limit the messages added to the replay log to include only messages with specific topics.

Topic subscriptions can include wildcards. For more information about using wildcards, see Wildcard Characters in SMF Topic Subscriptions.

To filter which messages are added to the replay log, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Replay in the left navigation bar.
  3. Click the Subscriptions tab.
  4. Click +Subscription.
  5. Enter one or more topic subscriptions.
  6. Click Create.
  7. Click the Settings tab.
  8. Click Edit .
  9. Click the Topic Filter Enabled toggle to enable topic filtering.
  10. Click Apply.

Initiating Message Replay

If you have a replay log, you can initiate message replay for a queue or topic endpoint.

To initiate message replay, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Queues in the left navigation bar.
  3. Click either the Queues or Topic Endpoints tab, depending on the type of endpoint you want to initiate replay for.
  4. Select the checkbox for the endpoint or queue you want to initiate replay to.
  5. Click Action > Start Replay.
  6. Select the starting point for the replay:
    • Start Replay from Beginning—replay starts from the oldest message in the replay log. All messages in the replay log that match the endpoint’s subscriptions are delivered to the endpoint.
    • Start Replay from Date—specify the date and time that replay starts from. Any messages in the replay log equal to, or newer than, the specified date and time that match the endpoint’s subscriptions are delivered to the endpoint.
    • Start Replay from Replication Group Message ID—specify a replication group message ID after which replay starts. Any messages in the replay log received after the specified message ID that match the endpoint's subscriptions are delivered to the endpoint.
  7. Click Start Replay.

    Endpoints display one of the following replay states:

    StateDescription

    N/A

    Message replay has never been requested for the endpoint.

    Complete

    The last requested replay has finished and no replay is in progress.

    Initializing

    A message replay has been requested and will begin after all live messages have been removed from the endpoint.

    Active

    Message replay is in progress. The endpoint is currently receiving messages from the replay log.

    Pending Complete

    Message replay has reached the end of the replay log but there are still unacknowledged replayed messages on the endpoint. New live messages are being delivered to the endpoint. However, replay can still fail, in which case the unacknowledged replayed messages would be deleted from the endpoint.

    Failed

    A replay has failed and is the endpoint is waiting for acknowledgment of the unbind request it sent to the event broker as a failure indication.

Trimming the Replay Log

You can trim the replay log manually to remove messages from it. Messages are also trimmed automatically when needed to keep the log size below its limit.

To trim the replay log, perform these steps:

  1. Open Broker Manager. For instructions, see Using PubSub+ Broker Manager.
  2. Select Replay in the left navigation bar.
  3. Click Action > Trim Logged Messages.
  4. Select one of the following options:
    • Select Clear Logs before Date and specify a data and time.
    • Select Clear All Logs.
  5. Click Trim Logged Messages.