Record Expired Queue Messages to a Dead Letter Topic

The listing below detects when a message expires from a queue, and publishes those messages to a dead letter topic.

<Actions>
    <Action>
        <On>
            <Module>amps-action-on-sow-expire-message</Module>
            <Options>
                <Topic>interesting-queue</Topic>
                <MessageType>json</MessageType>
            </Options>
        </On>
        <On>
            <Module>amps-action-on-sow-expire-message</Module>
            <Options>
                <Topic>another-interesting-queue</Topic>
                <MessageType>json</MessageType>
            </Options>
        </On>
        <Do>
            <Module>amps-action-do-publish-message</Module>
            <Options>
                <Topic>dead-letter</Topic>
                <MessageType>json</MessageType>
                <Data>{"topic":"{{AMPS_TOPIC}}","message":{{AMPS_DATA}} }</Data>
            </Options>
        </Do>
    </Action>
</Actions>

Last updated

Copyright 2013-2024 60East Technologies, Inc.