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

Check For FutureFailure on send (future.isDone()) #1437

Closed
garyrussell opened this issue Apr 7, 2020 · 0 comments · Fixed by #1438
Closed

Check For FutureFailure on send (future.isDone()) #1437

garyrussell opened this issue Apr 7, 2020 · 0 comments · Fixed by #1438

Comments

@garyrussell
Copy link
Contributor

See https://stackoverflow.com/questions/60997497/spring-kafka-transactional-producer-error-handling/60999189#comment108063754_60999189

When a send fails, e.g. send to missing partition, the Producer returns an already complete FutureFailure which we currently discard.

Check Future.isDone() and get() so that the exception is propagated to the caller.

@garyrussell garyrussell added this to the 2.5.M1 milestone Apr 7, 2020
@garyrussell garyrussell self-assigned this Apr 7, 2020
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Apr 7, 2020
Resolves spring-projects#1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**
artembilan pushed a commit that referenced this issue Apr 7, 2020
Resolves #1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**

* Fix mock tests.
garyrussell added a commit that referenced this issue Apr 7, 2020
Resolves #1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**

* Fix mock tests.
garyrussell added a commit that referenced this issue Apr 7, 2020
Resolves #1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**

* Fix mock tests.
garyrussell added a commit that referenced this issue Apr 7, 2020
Resolves #1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**

* Fix mock tests.
garyrussell added a commit that referenced this issue Apr 7, 2020
garyrussell added a commit that referenced this issue Apr 7, 2020
Resolves #1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**

* Fix mock tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment