iggy icon indicating copy to clipboard operation
iggy copied to clipboard

Write testcase to verify deduplication of messages

Open hubcio opened this issue 1 year ago • 4 comments

Unfortunately we don't have this tested (yet).

hubcio avatar Sep 25 '23 21:09 hubcio

@hubcio

i would like to help on this one, i am new with message streaming. silly question : duplication of messages are messages same in content ?

0xkelvin avatar Oct 21 '23 13:10 0xkelvin

@0xkelvin the message deduplication is an optional feature allowing to ignore the messages with the same ID. Whenever the user sends the messages to the server, there's the optional ID field (u128 e.g. UUID or so) - either the user might provide the unique ID or otherwise the server will generate it automatically. When the deduplication is enabled, the server will check if the received message ID already exists - for example, the message producer might have a bug resulting in sending the same message multiple times or so. If this feature is enabled, then the server doesn't care about duplicated IDs.

spetz avatar Oct 21 '23 15:10 spetz

i see, let me dive in into the code and try to write the test, it is great if you can help point me to that code file

0xkelvin avatar Oct 27 '23 13:10 0xkelvin

oh, i think here is it : https://github.com/iggy-rs/iggy/blob/382c972cc9039b157cf87f34370c5eee2feed1ac/server/src/streaming/partitions/messages.rs#L340-L341

0xkelvin avatar Oct 27 '23 14:10 0xkelvin