
Ask HN: Is There a “Smart” Message Queue? - bgdam
I&#x27;m currently using RabbitMQ for a variety of message queuing needs, and I&#x27;m running into a specific issue repeatedly.<p>If I push 10 messages to a queue, and say 5 of them have the same &#x27;key&#x27; parameter, then I want to automatically discard the previous messages still in the queue with the same key.<p>Is there any message queue which already has this baked into it out of the box?
======
brudgers
Architecturally, the idea of discarding duplicate messages from a queue is:

    
    
      queue -> parser -> queue
    

Discarding duplicate messages is a piece of business logic. The parser could
be as simple as a hashmap/dictionary or bloom filter that emits or does not
emit the message based on the selected criteria.

This is a case where I like the idea of Unix pipes and where I might think in
terms of log data structures rather than queues. Your mileage may vary.

Good luck.

