Skip to content

Message duplication after ConsumerRebalancing #80

@stepio

Description

@stepio

It's not a bug report, more like a consultancy request... maybe an idea for the feature.

While playing with kafka-console-consumer I've spotted that sometimes after consumer rebalancing same message is received the second time. Checked google, read the article:
https://cwiki.apache.org/confluence/display/KAFKA/Idempotent+Producer
As I understand, it's not a bug, but kind of limitation.

But we all know that in many cases message uniqueness is important & same message should not be processed second time. So is there any already implemented approach to achieve such uniqueness?

As of now, I see the next quite easy mechanism, which may help:

  1. On producer side: each message should be wrapped into a "holder" object with unique id (UUID).
  2. On consumer side: each message Id should be compared with the previous one (or ones) - if such an id is already known, the received message should be logged & discarded.

What do you think?

P.S.: This may be related to #66 & #79

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions