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

[fix][client] Fix DLQ producer name conflicts when multiples consumers send messages to DLQ #21890

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

RobertIndie
Copy link
Member

Fixes #21888

Motivation

The root cause of #21888 is that a regression bug is introduced in #21589. The producer name will be conflicted when multiple consumers in the same topic and subscription send messages to DLQ concurrently.

Modifications

  • Use {topic}-{subName}-{consumerName}-DLQ as the deadLetterProducer name. For instance, it could be my-topic-partition-0-mySub-myConsumer-DLQ

Verifying this change

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@RobertIndie RobertIndie added type/bug The PR fixed a bug or issue reported a bug release/blocker Indicate the PR or issue that should block the release until it gets resolved labels Jan 12, 2024
@RobertIndie RobertIndie added this to the 3.2.0 milestone Jan 12, 2024
@RobertIndie RobertIndie self-assigned this Jan 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 12, 2024
@codelipenghui codelipenghui merged commit 252509e into apache:master Jan 15, 2024
54 checks passed
RobertIndie pushed a commit to apache/pulsar-client-go that referenced this pull request Jan 15, 2024
…essages to DLQ (#1156)

### Motivation

To keep consistent with the Java client.
Releted PR: apache/pulsar#21890

### Modifications

Set DLQ producerName `fmt.Sprintf("%s-%s-%s-DLQ", r.topicName, r.subscriptionName, r.consumerName)`
RobertIndie pushed a commit to apache/pulsar-client-go that referenced this pull request Jan 15, 2024
…essages to DLQ (#1156)

### Motivation

To keep consistent with the Java client.
Releted PR: apache/pulsar#21890

### Modifications

Set DLQ producerName `fmt.Sprintf("%s-%s-%s-DLQ", r.topicName, r.subscriptionName, r.consumerName)`

(cherry picked from commit 4e13822)
Technoboy- pushed a commit that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test release/blocker Indicate the PR or issue that should block the release until it gets resolved type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] DLQ producer name conflicts when consumer sends messages to DLQ
3 participants