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 are kept until the log is full, after which the oldest messages are removed to make space for new messages.

Message replay can be performed for a non-partitioned queue or a topic endpoint. 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 requested replay start time. The event broker delivers any messages held in the replay log that match any subscription on that queue or topic endpoint.

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 PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Replay in the left navigation bar. The Summary page displays the size of the replay log and the current replay state.
  4. 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.
  5. Click the Stats tab to display additional statistics for the replay log.

Configuring the Replay Log

You enable message replay for a Message VPN by configuring a replay log.

Solace recommends that you provision the replay log's Maximum Spool Usage to be 25% more than the amount of data you need to retain in the replay log.

To set up a replay log, perform these steps:

  1. Open Broker Manager. For instructions, see PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Replay in the left navigation bar.
  4. Perform one of the following steps:
    • If a replay log already exists, click the Settings tab and then click Edit .
    • If no replay log exists, click Create Replay Log.
  5. 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.

  6. Click Apply.

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 Topic Subscriptions.

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

  1. Open Broker Manager. For instructions, see PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Replay in the left navigation bar.
  4. Click the Subscriptions tab.
  5. Click +Subscription.
  6. Enter one or more topic subscriptions.
  7. Click Create.
  8. Click the Settings tab.
  9. Click Edit .
  10. Click the Topic Filter Enabled toggle to enable topic filtering.
  11. 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 PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Queues in the left navigation bar.
  4. Click either the Queues or Topic Endpoints tab, depending on the type of endpoint you want to initiate replay for.
  5. Select the checkbox for the endpoint or queue you want to initiate replay to.
  6. Click Action > Start Replay.
  7. 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.
  8. 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 PubSub+ Broker Manager.
  2. Select a Message VPN.
  3. Select Replay in the left navigation bar.
  4. Click Action > Trim Logged Messages.
  5. Select one of the following options:
    • Select Clear Logs before Date and specify a data and time.
    • Select Clear All Logs.
  6. Click Trim Logged Messages.