apache / apache/pulsar

producer.sendAsync is interrupted by client.close()

Open
#11,780 3 comments 0 reactions 0 assignees View on GitHub
lifecycle/stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
If the client closes while sendAsync() is processed, the message is lost.

**To Reproduce**
see https://github.com/infiniticio/pulsar-bug-clientAsync

**Expected behavior**
The message should be sent before actually closing the client (https://apache-pulsar.slack.com/archives/C5Z4T36F7/p1629752614463900?thread_ts=1629723649.441700&cid=C5Z4T36F7)

**Additional context**
none

Contributor guide

Open the contributing guide

Research direction

Start with the linked reproducer at infiniticio/pulsar-bug-clientAsync, then trace producer.sendAsync() and client.close() through the Java client. The fix is done when the reproduced message is sent before the client closes, without being lost.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.