On OOF Message
Last updated
Last updated
Copyright 2013-2024 60East Technologies, Inc.
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 |
---|---|
This module adds the following variables to the AMPS context:
Variable | Description |
---|---|
Topic
(required)
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.
MessageType
(required)
The message type of the topic to monitor for OOF messages.
This parameter supports regular expressions.
There is no default for this parameter.
Filter
Set the filter to apply.
This filter forms the internal subscription for which OOF messages will be generated.
Type
The type of OOF message to take action on:
match
- take action on OOF messages generated because message no longer matches filter.
delete
- take action on OOF messages generated because message has been removed from the SOW.
expire
- take action on OOF messages generated because the message expired from the SOW.
all
- take action on all of the above types.
Default: all
AMPS_TOPIC
The topic of the OOF message.
AMPS_DATA
The data of the OOF message.
AMPS_DATA_LENGTH
The length of the data of the OOF message.
AMPS_PREVIOUS_DATA
The data previously contained from the updated record.
AMPS_PREVIOUS_DATA_LENGTH
The length of the data previously contained from the updated record.