Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit 9d79d6a

Browse files
authored
add config for allowAutoTopicCreationType=partitioned in doc (#132)
* fix log format * add config for allowAutoTopicCreationType=partitioned in doc
1 parent c6b5d43 commit 9d79d6a

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

DEVELOP.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,22 @@ As mentioned previously, KoP module is loaded along with the Pulsar broker. You
5959
1. Set the configuration of the KoP protocol handler.
6060

6161
Add the following properties and set their values in Pulsar configuration file, such as `conf/broker.conf` or `conf/standalone.conf`.
62-
62+
63+
Regarding topic auto create partition type, if you are not using [StreamNative Platform](https://streamnative.io/docs/v1.0.0/), please set it to `partitioned`.
6364

6465
Property | Set it to the following value | Default value
6566
|---|---|---
6667
`messagingProtocols` | kafka | null
6768
`protocolHandlerDirectory`| Location of KoP NAR file | ./protocols
68-
69+
`protocolHandlerDirectory`| Location of KoP NAR file | ./protocols
70+
`allowAutoTopicCreationType`| partitioned | non-partitioned
71+
6972
**Example**
7073

7174
```
7275
messagingProtocols=kafka
7376
protocolHandlerDirectory=./protocols
77+
allowAutoTopicCreationType=partitioned
7478
```
7579
7680
2. Set Kafka service listeners.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,22 @@ add configurations in Pulsar's configuration file, such as `broker.conf` or `sta
6464
1. Set the configuration of the KoP protocol handler.
6565

6666
Add the following properties and set their values in Pulsar configuration file, such as `conf/broker.conf` or `conf/standalone.conf`.
67-
67+
68+
Regarding topic auto create partition type, if you are not using [StreamNative Platform](https://streamnative.io/docs/v1.0.0/), please set it to `partitioned`.
6869

6970
Property | Set it to the following value | Default value
7071
|---|---|---
7172
`messagingProtocols` | kafka | null
7273
`protocolHandlerDirectory`| Location of KoP NAR file | ./protocols
73-
74+
`protocolHandlerDirectory`| Location of KoP NAR file | ./protocols
75+
`allowAutoTopicCreationType`| partitioned | non-partitioned
76+
7477
**Example**
7578

7679
```
7780
messagingProtocols=kafka
7881
protocolHandlerDirectory=./protocols
82+
allowAutoTopicCreationType=partitioned
7983
```
8084
8185
2. Set Kafka service listeners.

kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,8 @@ private CompletableFuture<PartitionMetadata> findBroker(TopicName topic) {
13431343
&& localListeners.contains(kopBrokerUrl)) {
13441344
topicManager.getTopic(topic.toString()).whenComplete((persistentTopic, exception) -> {
13451345
if (exception != null || persistentTopic == null) {
1346-
log.warn("[{}] findBroker: Failed to getOrCreateTopic {}. exception:",
1347-
ctx.channel(), topic.toString(), exception);
1346+
log.warn("[{}] findBroker: Failed to getOrCreateTopic {}. broker:{}, exception:",
1347+
ctx.channel(), topic.toString(), kopBrokerUrl, exception);
13481348
returnFuture.complete(null);
13491349
} else {
13501350
if (log.isDebugEnabled()) {

0 commit comments

Comments
 (0)