ActiveMQ messageId not working to stop duplication

前端 未结 1 1248
春和景丽
春和景丽 2021-01-28 23:31

I am using ActiveMQ for messaging and there is one requirement that if message is duplicate then it should handled by AMQ automatically. For that I generate unique message key

1条回答
  •  情话喂你
    2021-01-29 00:11

    A consumer can receive duplicate messages mainly for two reasons: a producer sent the same message more times or a consumer receive the same message more times.

    Apache ActiveMQ Artemis includes powerful automatic duplicate message detection, filtering out messages sent by a producer more times.

    To prevent a consumer from receiving the same message more times, an idempotent consumer must be implemented, ie Apache Camel provides an Idempotent consumer component that would work with any JMS provider, see: http://camel.apache.org/idempotent-consumer.html

    0 讨论(0)
提交回复
热议问题