On OOF Message
When a record that previously matched a subscription has been updated so that the record no longer matches its subscription, AMPS sends an out-of-focus (OOF) message to let subscribers know that their record no longer matches the subscription. With amps-action-on-oof-message
, you can enter a subscription within AMPS and run actions when an OOF message for that subscription is produced.
This action is treated by the AMPS engine as a subscription from an internal AMPS client.
Do not use this action with queue topics. Since this action creates a subscription, using this action with the queue topic will cause the action to lease messages from the queue even though the action does not acknowledge messages. This means that, when used with the queue topic itself, the action will interfere with other subscribers and, depending on the queue configuration, may only receive one message during the lifetime of the instance.
Furthermore, because each publish to a queue topic is treated as a distinct message, a subscription to a queue topic will never produce oof
messages.
This module requires the Topic
and the MessageType
of the OOF message. In addition to that, this module also accepts the optional parameters listed below:
Parameter | Description |
---|---|
| The topic to monitor for OOF messages. The topic specified must be a SOW topic, view or conflated topic. This parameter supports regular expressions. There is no default for this parameter. This module should not be used with queue topics. |
| The message type of the topic to monitor for OOF messages. This parameter supports regular expressions. There is no default for this parameter. |
| Set the filter to apply. This filter forms the internal subscription for which OOF messages will be generated. |
| The type of OOF message to take action on:
Default: |
This module adds the following variables to the AMPS context:
Variable | Description |
---|---|
| The topic of the OOF message. |
| The data of the OOF message. |
| The length of the data of the OOF message. |
| The data previously contained from the updated record. |
| The length of the data previously contained from the updated record. |
Last updated