Copy Messages that Exceed a Timeout to a Different Topic

The listing below, in effect, copies messages from the Orders topic to the Orders_Stale topic when the status has been PENDING for more than 5 seconds.

<Actions>
    <Action>
        <On>
            <Module>amps-action-on-message-condition-timeout</Module>
            <Options>
                <MessageType>nvfix</MessageType>
                <Topic>Orders</Topic>
                <Filter>/status = 'PENDING'</Filter>
                <Duration>5s</Duration>
            </Options>
        </On>
        <Do>
            <Module>amps-action-do-publish-message</Module>
            <Options>
                <MessageType>nvfix</MessageType>
                <Topic>Orders_Stale</Topic>
                <Data>{{AMPS_DATA}}</Data>
            </Options>
        </Do>
    </Action>
</Actions>

Last updated

Copyright 2013-2024 60East Technologies, Inc.