Skip to content

GH-1369: Fix Fenced Consumer-based Producers #1378

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

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

garyrussell
Copy link
Contributor

Resolves #1369

  1. CloseSafeProducer.cache was incorrectly null
    (direct access to this.cache instead of getCache()
    Prevented closure of a fenced consumerProducer

  2. Don't call the AfterRollbackProcessor when a producer is fenced -
    the partitions will have already been revoked so seeking is inappropriate
    and starting a new transaction will fence the new (current) producer.

cherry-pick to 2.3.x if clean

Resolves spring-projects#1369

1. `CloseSafeProducer.cache` was incorrectly null
   (direct access to `this.cache` instead of `getCache()`
   Prevented closure of a fenced `consumerProducer`

2. Don't call the `AfterRollbackProcessor` when a producer is fenced -
   the partitions will have already been revoked so seeking is inappropriate
   and starting a new transaction will fence the new (current) producer.

**cherry-pick to 2.3.x if clean**
@artembilan artembilan merged commit f44193e into spring-projects:master Feb 4, 2020
@artembilan
Copy link
Member

... and cherry-picked to 2.3.x

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

Successfully merging this pull request may close these issues.

Spring kafka should handle some fatal exceptions like InvalidPidMappingException, UnknownProducerIdException.
2 participants