Why Messages going to the DLQ do not expire while using TimeStampPlugin ?

Solution Verified - Updated -

Issue

  • ActiveMQ provides a special plugin called the "TimeStampPlugin". This plugin allows us to override the message expiration and to force messages to expire. We use this plugin a lot. Now, the original "TimeStampPlugin" did not handle messages going to the DLQ. Meaning all messages going to the DLQ lived there forever and could never expire. Because of KahaDB issues and fragmentation, we want the messages in the DLQ to have a TTL and to expire after a certain time.

  • We took the code from the "TimeStampPlugin" and modified it to expire messages going to the DLQ. Now we are at the crux of the problem. When ActiveMQ sends a message from the main queue to the DLQ, the message expires, BUT and this is a big BUT, the message count does NOT go down and Kaha records do NOT get released. It becomes a ghost message. If we "purge" the queue, kahaDB will clean up.

  • how to configure the message expiration for DLQs. What is recommended configuration to make messages in DLQ without a consumer expire without running to some hazards ?

  • So how can we fix this or prevent this?

Environment

  • Red Hat JBoss A-MQ
    • 6.1.0
    • 6.2.1
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content