Configuring Message Replay

To begin configuring a replay log on a Message VPN using Solace CLI, you can use the following CONFIG commands.

solace> enable
solace# configure
solace(configure)# message-spool message-vpn <vpn-name>

Where:

  • <vpn-name>—The name of Message VPN on which you wish to set up or configure a replay log.

After you're in the Message VPN, you can use the following Solace CLI commands,

Create or Delete a Replay Log

You can create one replay log per Message VPN. To do so, use the following create replay-log command.

solace(configure/message-spool)# create replay-log <replay-log-name>

Where:

<replay-log-name>—The name of the message replay log. It can be up to 185 characters long, should not contain any of the following characters or symbols in the name:

  • hash (#)
  • less than(<)
  • greater than(#<>*?&;)
  • asterisk( *)
  • question mark (?)
  • ampersand (&)
  • semi-colon (;)

Upon creation, the replay log is disabled. To enable message replay, run the no shutdown command.  For example:

solace(configure/message-spool/replay-log)# no shutdown

To delete a replay log and all the logged messages, use the no replay-log <replay-log-name> command and type y to confirm only if you want delete the replay log.

It's important to be aware that running the no replay-log <replay-log-name> command irreversibly deletes all logged messages!

solace(configure/message-spool/replay-log)# shutdown
solace(configure/message-spool/replay-log)# exit
solace(configure/message-spool)# no replay-log <replay-log-name>

This command will delete all logged messages on the message-vpn.
Do you want to continue (y/n)? y

Configuring the Replay Log Size Using max-spool-usage

The max-spool-usage command allows you to set the maximum space that can be used by the replay log. Solace recommends that you provision the replay log's max-spool-usage to be 25% more than the amount of data you need to retain in the replay log. For example, if you need to retain 10,000 MB of data, configure the replay log's max-spool-usage to be 12,500 MB. The additional 25% accounts for:

  • Replay log trimming, which occurs at 90% of the replay log's configured quota for max-spool-usage .

  • The replay log is indexed to optimize performance and the index utilization is included in the configured quota for max-spool-usage.

    The recommendation to provision max-spool-usage 25% over the amount of data you need retain is based on an estimate. The actual index overhead varies depending on the size of the messages and the topic lengths stored in the replay log. If trimming occurs prematurely or excessively and impacts the retention of the required data, consider adjusting the max-spool-usage accordingly.

To configure the replay log, perform the following commands in the Solace CLI:

solace(configure/message-spool)# replay-log <replay-log-name>
solace(configure/message-spool/replay-log)# max-spool-usage <size-in-MB>

Where:

<replay-log-name>—The name of message replay log.

<size-in-MB>—The maximum space that can be taken up by the replay log in megabytes (MB). The following are special considerations when you set this value:

  • You cannot run the no shutdown on the replay log if max-spool-usage is zero (0).
  • You cannot set max-spool-usage to zero (0) if the replay log is enabled.

If you’re changing max-spool-usage to a value lower than that currently in use, you’ll cause the log to be trimmed, starting with the oldest messages.

The no max-spool-usage command sets the size to zero.

The replay log spool usage counts towards the Message VPN max-spool-usage so in addition to checking the configured quota of max-spool-usage for the replay log, ensure that you validate that the Message VPN's spool usage (max-spool-usage) is sufficiently large to allow messages to be stored on queues that are not in the replay log. For more information about setting the max-spool-usage value for the Message VPN, see Message VPN-Level Guaranteed Messaging Configuration.

Specifying the Messages to Add to the Replay Log

By default, all Guaranteed messages (that are not rejected to the publisher) are stored in the replay log. Because message spool space is consumed for every published message stored in the replay log, depending on your deployment, you may want to use topic filters to include or exclude messages to improve performance, and to control the messages that are written to the replay log.

The topic-filter command allows you to:

  • Provision topic filter subscriptions that specify which messages are written to the replay log. Any messages that do not match the configured topics are still delivered to the subscribing clients, but are not written to the replay log.
  • Configure wildcard subscriptions. For example, you can:
    • Use a greater than symbol (>) as a wildcard to include all messages.
    • Use wildcards on topics, for example an asterisk as part of the topic path (a/b/*).
  • Use topic exceptions that can exclude certain subscriptions specified with an exclamation mark (!).

You can use combinations of subscriptions and exceptions. For example, you could use > to include all topics, and then use the topic exceptions to exclude specific topics you don't want in the replay log, such as !a/b/c.

solace(configure/message-spool)# replay-log <replay-log-name>
solace(configure/message-spool/replay-log)# topic-filter
solace(...message-spool/replay-log/topic-filter)# create subscription <topic>

Where:

<topic>—The name of the topic subscription to be added, in the format, a/b/c. You can also configure wildcard subscriptions (>, *) and subscription exceptions (!) to identify the messages that are to be written to the replay log. For more details about the syntax, see Solace Message Format Topics.

To delete a specified topic subscription from the topic filters, you can use the no subscription <topic> command.

After you have configured the topic filter subscriptions, use the no shutdown command to enable topic filtering for the replay log, and conversely the shutdown command to disable it.

solace(configure/message-spool/replay-log)# topic-filter
solace(...message-spool/replay-log/topic-filter)# no shutdown

Disabling or Enabling a Replay Log

You can disable or enable a replay log using the shutdown or no shutdown commands, respectively. Optionally, you can enable or disable traffic ingress or egress traffic to and from the replay log using the ingress and egress as parameters to your command.

You can use the following commands to enable traffic to replay log:

solace(configure/message-spool)# replay-log <replay-log-name> 
solace(configure/message-spool/replay-log)# no shutdown

You use the following commands to disable traffic to a replay log:

solace(configure/message-spool)# replay-log <replay-log-name> 
solace(configure/message-spool/replay-log)# shutdown

Where:

<replay-log-name>—The name of message replay log.

ingress—The command applies to the enabling or disabling of new message spooling to the replay log. If you disable ingress traffic to the replay log, it creates gaps in the replayable data and is not recommended.

egress The command applies to the enabling or disabling of the delivery of logged messages to replaying endpoints. If you disable egress traffic from the replay log, it pauses all ongoing replays of logged messages.

full—The command applies to both ingress and egress traffic. When no parameters are specified, this is the default behavior.