Monitoring Message Replay

When message replay is configured correctly, the event broker automatically trims the oldest messages from the replay log to make room for new messages as they arrive. After you configure message replay, Solace recommends that you monitor the replay log's configured quota for max-spool-usage.

While monitoring, if you find that your replay log consistently exceeds 90% of its configured quota for max-spool-usage, it indicates that ingress traffic to the replay log occurs faster than the event broker can perform trimming. In this situation, Solace recommends that you investigate. For more information, see Impacts of Slow Trimming.

To resolve this issue, you may need to take one or more of the following:

If you notice that there are bursts of messages, Solace recommends that you characterize the burst pattern and then adjust the replay log size to absorb it. The latter can result in adequate time for the event broker to performing trimming. Contact Solace if you require further assistance.

See the following topics to understand how you can monitor message replay to ensure that it operates as expected:

Applicable show Commands

You can use the follow commands to monitor message replay.

The following table lists Solace CLI show commands that can be useful in monitoring message replay.

Command Description

show replay-log

Shows the number of messages logged, the space consumed by those messages, the value set for max-spool-usage, and the ingress and egress states. Details are shown in Checking the Status of Replay Using show replay-log.

show queue <replay-queue-name> replay-state all

Shows all queues in a user-specified replay-state for the queues for replay log queues. See Understanding the Message Replay Queues.

show queue <replay-queue-name> replay

Shows the replay state, last replayed message time, last replay start time, last replay complete time, last replay failure time, and last replay failure reason.

show queue <replay-queue-name> stats

Shows the number of replays initiated, replays succeeded, replays failed, messages replayed, and replayed messages ACKed.

show topic-endpoint <endpoint-name> replay-state <state>

Shows all topic-endpoints in a user specified replay-state.

show topic-endpoint <endpoint-name> replay

Shows replay state, last replayed message time, last replay start time, last replay complete time, last replay failure time, and last replay failure reason.

show topic-endpoint <endpoint-name> stats

Shows the number of replays initiated, replays succeeded, replays failed, messages replayed, and replayed messages ACKed.

show message-spool stats

Shows the message-spool processing statistics and associated message replay processing statistics.

show message-spool message-vpn <message-vpn-name> stats

Shows the message-spool processing statistics for a specified Message VPN and associated message replay processing statistics.

For a detailed description of the above commands, see the CLI Command Reference.

Understanding the Message Replay Queues

When you configure a replay log on a Message VPN, two queues called #REPLAY_LOG_<replay-log-name> and #REPLAY_TOPICS_<replay-log-name> are created. The replay logs created are as follows:

  • #REPLAY_LOG_<replay-log-name>
    • Holds all the logged messages.

    • Messages in this queue are counted towards the Message VPN quota.

  • #REPLAY_TOPICS_<replay-log-name>
    • Holds the metadata about the logged messages (message ID, time spooled, topic string).

    • Its contents are counted towards the Message VPN quota.

You cannot configure these queues through the usual Solace CLI commands associated with queue configuration.

Checking the Status of Replay Using show replay-log

For the replay logs identified in the show replay-log command you can show:

  • the number of messages logged
  • the space consumed by those messages
  • the value set for max-spool-usage, and the ingress and egress states

For an example of using the command for monitoring usage, see Monitoring the Replay Log Usage.

solace> show replay-log <name> [message-vpn <vpn-name>] [messages [oldest | newest] [msg-id <msg-id> | replication-group-msg-id <replication-group-msg-id> | priority <priority>] [detail] | topic-filters] [count <num-elements>]

Where:

  • <name>—The name of the message replay log.
  • <vpn-name>— The name of the Message VPN.
  • messages—Specifies to show information on the messages associated with the replay log.
  • oldest—Specifies to show the messages in the replay log in order from oldest to newest.
  • newest—Specifies to show messages in the replay log in order from newest to oldest.
  • msg-id <msg-id>—Specifies to show the messages in the replay log starting from the message identifier number specified by <msg-id>.
  • replication-group-msg-id <replication-group-msg-id>— Specifies to show the messages in the replay log starting from the replication group message ID specified by <replication-group-msg-id>.
  • priority <priority>—Specifies to show only the messages in the replay log with the priority specified by <priority>. Valid values are 0 through 9.
  • topic-filters—Specifies to show subscriptions associated with the replay log.
  • count <num-elements>—Specifies the number of display elements to show. Valid values are 1 through 4294967295.

Monitoring the Replay Log Usage

You can use the PubSub+ Broker Manager or Solace CLI to monitor the replay log usage against its configured quota for max-spool-usage.

To determine the usage for the replay log, you can either:

  • Log in to PubSub+ Broker Manager, select the Message VPN you want to view, and select Replay from the left navigation pane.

    For more information about using Broker Manager, see PubSub+ Broker Manager (for software event broker) or Using PubSub+ Broker Manager (PubSub+ Cloud).

  • Run the show replay-log <replay-log-name> command in the Solace CLI. From the results, you use value of Log Usage(MB) and divide it by the Quota(MB) to calculate the percentage of the configured quota. For example, this would be 1773.21/2000 which equals 89% usage.

    solace(configure/message-spool/replay-log)# show replay-log my-first-log
    
    Flags Legend:
    I - Ingress Admin State (U=Up, D=Down)
    E - Egress  Admin State (U=Up, D=Down)
    F - Topic Filter State (E=Enabled, D=Disabled)
    
    Replay Log Name              Messages        Log            Status
    Message VPN                    Logged  Usage(MB)  Quota(MB) I E F
    ------------------------- ----------- ---------- ---------- ------
    My-first-replay-log
    default                           928    1773.21       2000 U D E