3

Am using AMQ 5.5. I would like to disable the option of sending dead letters to ActiveMQ.DLQ destination and completely discard (automatically) the messages that would be sent there otherwise. To do this I had configured the broker as below:

<amq:destinationPolicy>
        <amq:policyMap>
          <amq:policyEntries>
            <amq:policyEntry topic=">" producerFlowControl="false" >
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>
            <amq:policyEntry queue=">" producerFlowControl="false">
                <amq:deadLetterStrategy>
                      <amq:sharedDeadLetterStrategy processExpired="false" />
                </amq:deadLetterStrategy>
            </amq:policyEntry>

          </amq:policyEntries>
        </amq:policyMap>
    </amq:destinationPolicy>

However, I still see that the messages are getting stored in DLQ. Can you please let me know what could be causing this? Do I need to fix anything in the config?

Thanks

Hari

Hari
  • 51
  • 2
  • 7
  • Can somebody please help me out with this? Its causing our data dir to grow un-necessarily. – Hari Dec 07 '11 at 04:36

1 Answers1

2

The problem faced here was that, the above given configuration would discard only non-persistent expired messages. To discard all expired messages, persistent and non-persistent, use discardingDLQBrokerPlugin.

<amq:plugins>

<amq:discardingDLQBrokerPlugin dropAll="true"/>

</amq:plugins>

Hari
  • 51
  • 2
  • 7