apache / apache/pulsar

Add additional data to negativeAcknowledge

Open
#18,676 1 comment 1 reaction 0 assignees View on GitHub
Stale
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Motivation

When rejecting a message I want to add some additional information that I can get when the message is consumed again.

### Solution

Add new API:

```java
void negativeAcknowledge(MessageId messageId, Map additionalProperties);
```

Consumer:
```java
Message msg = consumer.receive();
// Includes additional information
msg.getProperties();
```

### Alternatives

_No response_

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Consumer.negativeAcknowledge API and the Message properties accessed through msg.getProperties(). Determine how additionalProperties could travel from rejection to redelivery, then verify that the proposed overload preserves existing negative-acknowledgement behavior. Done means the new API is available and the additional information is present when the message is consumed again.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.