You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "elvizlai (via GitHub)" <gi...@apache.org> on 2023/10/17 07:42:35 UTC
[I] [Bug] Inconsistent behaviour for allowAutoTopicCreationType [pulsar]
elvizlai opened a new issue, #21376:
URL: https://github.com/apache/pulsar/issues/21376
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
Run a standalone cluster in Docker
Pulsar: 3.1.0
### Minimal reproduce step
docker script environment
```
-e PULSAR_PREFIX_allowAutoTopicCreationType=partitioned
```
and none such env(thus default `non-partitioned`)
### What did you expect to see?
Both CreationType `should` auto create same RETRY/DLQ rule topic. `<topicname>-<subscriptionname>-RETRY`
ref:
https://github.com/apache/pulsar-site/pull/651
https://pulsar.apache.org/docs/3.1.x/concepts-messaging/#retry-letter-topic
### What did you see instead?
Write some code to consume topic, for example:
```
consumeFunc(topicname, subscriptionname, xxxHandler)
```
When using `non-partitioned` configuration server, it auto create topic as respected.
But when using `partitioned` config server, it auto create topic `subName-RETRY/DLQ` which may conflict when multi topics has same subName.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Inconsistent behaviour for allowAutoTopicCreationType [pulsar]
Posted by "1Jack2 (via GitHub)" <gi...@apache.org>.
1Jack2 commented on issue #21376:
URL: https://github.com/apache/pulsar/issues/21376#issuecomment-1836216189
I may have found the cause of this bug.
When allowAutoTopicCreationType=non-partitioned, and the topic does not exist, when `getPartitionedTopicMetadata` is executed, the broker automatically creates a topic with a partiton number of 1. This results in the use of the old name rule (`{tenant}/{namespaces}/{sub}-RETRY`).
See the following code, especially lines 144 to 149
https://github.com/apache/pulsar/blob/2bf13547bf4b4ec9babd6513a87dffbd53d678bb/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java#L126-L149
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Inconsistent behaviour for allowAutoTopicCreationType [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed issue #21376: [Bug] Inconsistent behaviour for allowAutoTopicCreationType
URL: https://github.com/apache/pulsar/issues/21376
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Inconsistent behaviour for allowAutoTopicCreationType [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #21376:
URL: https://github.com/apache/pulsar/issues/21376#issuecomment-6381716989
Thanks @elvizlai for the report and @1Jack2 for finding the cause. This was fixed by https://github.com/apache/pulsar/pull/22838 (part of PIP-344): when the consumer checks whether the legacy `<subscription>-RETRY` / `<subscription>-DLQ` topics exist, it now asks for partitioned-topic metadata with auto-creation disabled and treats "not found" as missing (`ConsumerBuilderImpl.checkDlqAlreadyExists`). The lookup no longer creates the legacy-named topic under `allowAutoTopicCreationType=partitioned`, so the default `<topic>-<subscription>-RETRY/DLQ` names are used unless the legacy topics already exist. I'm closing this. If you still see `<subscription>-RETRY` created on a currently supported release (4.0.x, 4.2.x or 5.0.x), with both client and broker on that release, please reopen.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org