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

Can key be removed from cache, after BasicAck and some time has ellapsed? #89

Open
torgashov opened this issue Jul 21, 2022 · 3 comments

Comments

@torgashov
Copy link

torgashov commented Jul 21, 2022

Hello! Is it possible to implement the deletion of keys from the cache, messages that have been removed from the queue (BasicAck) after some time has elapsed? If i right, keys stored in cache after message removed from queue (BasicAck).

@noxdafox
Copy link
Owner

Hello,

I am not sure I understand what is the use case here. What is you are trying to achieve?

If you want to deduplicate based on elapsed time, you can use exchange-level deduplication.

@AnirudhSA
Copy link

AnirudhSA commented Feb 17, 2023

Hi @noxdafox ,

@torgashov If I'm not wrong, Probably means that is it possible to remove the key from cache after the message has been acknowledged and removed from the queue.
Is it possible to have a parameter at exchange level where this auto-deletion of key can be enabled (which deletes the key after the message is removed from the queue)?

@noxdafox
Copy link
Owner

noxdafox commented Mar 5, 2023

I know what the OP is asking.

What is being asked is complicated both from a development and operation point of view.

The first question I have in mind is: based on what it is decided for how long to wait? What if a message arrives right after that time? If time is what matter, why not using the exchange level deduplication which allows a predictable deduplication window?

If a queue is empty, there will not be duplicate messages. Yet the same message can arrive over and over again.
If a queue is full, there is no way to predict for how long a message will be deduplicated. In the worst case scenario (no consumer) a message might be deduplicated forever.

Hence, I would like to understand from a high level what is the overall design of the application. A design which, IMHO, leads to overly complicated and unpredictable behaviour.

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

3 participants