Configuring Message Replay

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

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

Where:

<vpn-name> is the name of Message VPN on which you wish to set up or configure a replay log

Once 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> is the name of the message replay log. It can be up to 185 characters long, and is subject to the same restrictions as a queue name.

Upon creation, the replay log is disabled; to enable it, use the no shutdown command.

The no replay-log command deletes the replay log and all logged messages.

It's important to be aware that applying the no command irreversibly deletes the logged messages.

max-spool-usage

The max-spool-usage command allows you to set the maximum space that can be taken up by the replay log. If the limit is exceeded, excess messages will be trimmed starting with the oldest messages in the log.

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> - is the name of message replay log.

<size-in-MB> - is the maximum space that can be taken up by the replay log in MB. For instructions on how to calculate <size-in-MB>, refer to How to calculate max replay log size.

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.

Special Considerations:

  • You can’t no shutdown the replay log if max-spool-usage=0
  • You can’t set max-spool-usage=0 if the replay log is enabled

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

Replay log spool usage counts towards the Message VPN max-spool-usage.

How to calculate max replay log size

Use this formula to calculate the maximum space required by the replay log.

Max_Replay_Log_Size = 1.1 x Number_of_Messages_to_be_Logged x Average_Message_Size

Example:

Say you need to hold 24 hours worth of data, and during that time you estimate you'll receive 100,000 messages, each on average 1,024 bytes in size.

Max_Replay_Log_Size = 1.1 x 100,000 x 1,024 bytes = 112.64 MB, which is approximately 113 MB.

So, in the command, max-spool-usage <size-in-MB>, size-in-MB = 113.

In addition to checking this calculation, ensure that the Message VPN's 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.

topic-filter

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 filter the messages that are stored there.

The topic-filter command allows you to provision topic filter subscriptions that modify which messages are attracted by the replay log when enabled. Any messages not matching these configured topics are still delivered to subscribing clients, but are not written to the replay log.

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> - is the name of the topic subscription to be added in the form 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 details, see SMF Topics.

The no subscription <topic> command deletes the specified topic subscription from the replay topic filter.

After you are satisfied with 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

shutdown

The shutdown command allows you to disable a replay log, and no shutdown enables it. Use the following commands to disable a replay log.

solace(configure/message-spool)# replay-log <replay-log-name>
solace(configure/message-spool/replay-log)# shutdown [ingress|egress|full]

Where:

<replay-log-name> - is the name of message replay log.

ingress - means the command applies to the enabling or disabling of new message spooling to the replay log. Disabling will create gaps in the replayable data and isn't recommended.

egress - means the command applies to the enabling or disabling of the delivery of logged messages to replaying endpoints. Disabling pauses all ongoing replays of logged messages.

full - applies to both ingress and egress.