syhily commented on a change in pull request #19285:
URL: https://github.com/apache/flink/pull/19285#discussion_r840538244
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/sink/PulsarSinkBuilder.java
##########
@@ -315,6 +315,11 @@
if (!configBuilder.contains(PULSAR_PRODUCER_NAME)) {
LOG.warn(
"We recommend set a readable producer name through
setProducerName(String) in production mode.");
+ } else {
+ String producerName = configBuilder.get(PULSAR_PRODUCER_NAME);
+ if (!producerName.contains("%s")) {
+ configBuilder.override(PULSAR_PRODUCER_NAME, producerName + "
- %s");
Review comment:
We will replace the %s as a UUID in
[PulsarSinkConfigUtils.java](https://github.com/apache/flink/pull/19285/files#diff-a43e1010653a205454f362b6a20b92a5ce2bde863b47fcc851b9eb37a9d404fe).
This would make sure all the producer name unique. Same in
`PulsarSourceBuilder`.
```java
configuration.useOption(
PULSAR_PRODUCER_NAME,
producerName -> String.format(producerName, UUID.randomUUID()),
builder::producerName);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]