Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Polling reliably at scale using DLQs (smallcase.com)
28 points by ratancs on July 17, 2019 | hide | past | favorite | 4 comments


I would _not_ recommend using DLQs in ActiveMQ as a delivery delay mechanism. DLQs are meant to hold bad messages that can't be processed by your consumers. Conflating those with good messages most certainly sounds like a debugging nightmare. Imagine your database going down and thousands of messages heading to your DLQ... you'd want to replay those so you don't lose valuable data. Mixing that with stuff that needed to run into the future sounds like a true headache.

ActiveMQ is an amazing toolbox however. In fact, it contains the exact feature they want (and surprised they did not mention). Internally it is driven by a robust Quartz scheduler. You simple enable scheduling on your broker config (schedulerSupport="true") then all you would need to do is put a header on your messages AMQ_SCHEDULED_DELAY with the number of ms to delay.


ActiveMQ is awesome. Very easy to set up, lots of features, fast enough for most workloads and extremely stable.


Unlike ActiveMQ, RabbitMQ doesn't automatically send undelivered messages to a default DLQ. So that doesn't apply in this use case.

The ActiveMQ header to schedule messages looks promising. Thanks for sharing, will check it out. :)





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: