Skip to content
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

Close delegate producer after OutOfOrderSequenceException and UnknownProducerIdException #1441

Closed
garyrussell opened this issue Apr 9, 2020 · 1 comment · Fixed by #1442

Comments

@garyrussell
Copy link
Contributor

/**
 * This exception is raised by the broker if it could not locate the producer metadata associated with the producerId
 * in question. This could happen if, for instance, the producer's records were deleted because their retention time
 * had elapsed. Once the last records of the producerId are removed, the producer's metadata is removed from the broker,
 * and future appends by the producer will return this exception.
 */
public class UnknownProducerIdException extends OutOfOrderSequenceException {

/**
 * This exception indicates that the broker received an unexpected sequence number from the producer,
 * which means that data may have been lost. If the producer is configured for idempotence only (i.e.
 * if <code>enable.idempotence</code> is set and no <code>transactional.id</code> is configured), it
 * is possible to continue sending with the same producer instance, but doing so risks reordering
 * of sent records. For transactional producers, this is a fatal error and you should close the
 * producer.
 */
public class OutOfOrderSequenceException extends ApiException {
@garyrussell
Copy link
Contributor Author

This is fixed in the 2.4 broker, but we should add the code anyway in case older brokers are in use.

https://issues.apache.org/jira/browse/KAFKA-7190

garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Apr 10, 2020
Resolves spring-projects#1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Apr 10, 2020
Resolves spring-projects#1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
artembilan pushed a commit that referenced this issue Apr 10, 2020
Resolves #1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
garyrussell added a commit that referenced this issue Apr 10, 2020
Resolves #1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
garyrussell added a commit that referenced this issue Apr 10, 2020
Resolves #1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
garyrussell added a commit that referenced this issue Apr 10, 2020
Resolves #1441

Close and remove a producer after a `OutOfOrderSequenceException` or subclass.

**I expect conflicts so I will do the backports**
garyrussell added a commit that referenced this issue Apr 10, 2020
garyrussell added a commit that referenced this issue Apr 10, 2020
garyrussell added a commit that referenced this issue Apr 10, 2020
garyrussell added a commit that referenced this issue Apr 13, 2020
garyrussell added a commit that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment