Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue level message deduplication failed sometimes. #101

Open
OliverLiangx opened this issue Feb 3, 2023 · 1 comment
Open

Queue level message deduplication failed sometimes. #101

OliverLiangx opened this issue Feb 3, 2023 · 1 comment

Comments

@OliverLiangx
Copy link

Hello, since I work out on #94, the plugin works fine most of times. But I found out a few message will be consumed twice when we deploy two publisher nodes. So I try to figure out why this happens and it seems to be related to network delay. I wonder if there accessible for queue level to set x-cache-size and x-ttl ? And what is these two config default values?

@noxdafox
Copy link
Owner

noxdafox commented Mar 5, 2023

Hello,

the x-cache-size and x-cache-ttl are only used for exchange deduplication.

When you are deduplicating at the queue, you basically want to make sure there will not be 2 copies of the same message within the same queue at the same time. Hence, there is no need to set any TTL for the messages as time is not a relevant matter in here.

The x-cache-ttl is needed for exchange deduplication as we don't know how many messages will pass through an exchange. Hence, the deduplication cache would grow indefinitely. For queues instead, we know how big that cache will be: as big as the queue itself. If you put too many messages in the queue, you will run out of space before the cache size becomes an issue.

This plugin is not intended to handle broker induced duplicates. It works at the application level. In other words, it's designed to catch messages explicitly duplicated by your distributed applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants