How do I remove messages from a SOW?

Depending on your needs, there are several ways to do this:

  • You can configure message expiration for the SOW. In this case, AMPS deletes any messages in the SOW that are older than the amount of time configured. See the AMPS Configuration Guide for details.

  • You can set the expiration time on an individual message. In this case, AMPS deletes that particular message after the expiration time. (Notice that the SOW topic must also have message expiration configured: otherwise, AMPS does not process message expiration for that topic.) The AMPS Configuration Guide and the Developer's Guide for your language of choice have more details on how to set a per-message expiration.

  • You can delete messages from a client program. You can use a filter to delete messages that match the filter. Or, if you have the SOW keys for the messages to remove, you can use the keys directly to remove exactly those messages.

  • You can use the Action amps-action-do-delete-sow to remove records that match a particular filter in response to an event (such as a signal) or on a schedule.

In all cases, deleting messages from the SOW will send Out of Focus notifications to subscribers who have requested those notifications.

Last updated