Streaming with Kafka with the same groupid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2021 01:34 AM
A kafka topic is having 300 partitions and I see two clusters are running and have the same group id,
will the data be duplicate in my delta bonze layer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 10:26 PM
By default, each streaming query generates a unique group ID for reading data ( ensuring it's own its own consumer group ) . In scenarios where you'd want to specify it (authz etc ) , it is not recommended to have two streaming applications specify the same groupid. Spark keeps track of Kafka offsets internally and doesn’t commit any offset.
In any case, for sources that doesn't support exactly once behaviour, with delta you could achieve idempotency via MERGE