-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
[bug] Not all messages are consumed when dedupe is enabled #955
Comments
@zagadheesh I have actually no time to dig into this, could you do try to draft a PR to fix the issue? I already fixed dedupe a while ago for the same reason and the problem was the persistence used |
@robertsLando The proposed pull request would involve commenting out the 'dedupe' call in client.js. After conducting tests on release 0.42.6 without altering any source code, I observed that the consumer successfully consumed all messages. However, beyond this change, I haven't delved into the entirety of the source code. Any suggestions would be greatly appreciated! |
Commenting the dedupe fn is not the solution, it is there for a reason and it should stay there, we need to find out why the messages are not deduped correctly. Would be better if you can reproduce the same with a consumer'producer in nodejs instead of java |
Reproduced the same in node.js. Please find attched zip file which contains example.js which starts the broker with required configuration along with producer.js and consumer.js files. |
The issue with this bug seems to revolve around the order of the returned value of the brokerCounter. It appears reproducible when using MongoDB as the persistence type. My assumption is that we do not want to ignore out-of-order counts but rather counts that have already been processed. For example:
If this assumption is correct, then instead of keeping track of the largest count value, maintaining a recent set of values that have been processed could improve this function.
This approach ensures that we keep track of recently processed values, which can help in managing out-of-order counts more effectively. |
could you submit a PR ? |
Please review: #972 |
Done |
System Information
Describe the bug
I'm currently experiencing an issue while running Aedes alongside an MQTT Java client using example.js (attached) with no modifications to the aedes source code. Despite running both the consumer and producer, it seems that certain messages aren't being consumed. Interestingly, after commenting out the 'dedupe' call in the client.js file of the Aedes source code, the consumer is able to successfully consume all messages.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Consumer should consume all the messages produced.
aedes-problem-demo.zip
The text was updated successfully, but these errors were encountered: