You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Lan Liang <li...@163.com> on 2022/01/01 06:02:07 UTC
Re: [DISCUSSION] PIP-128: Add new command STOP_PRODUCER and STOP_CONSUMER
I believe that you can revoke permission for some topic/consumer.
Best Regards,
Lan Liang
On 12/29/2021 20:25,包子<wu...@icloud.com.INVALID> wrote:
Thanks reply, `terminate the topic` is useful
2021年12月29日 11:3113,PengHui Li <pe...@apache.org> 写道:
What is the background of the requirement?
Usually, we will not force to close the producer and consumer at the
server-side,
because we don't if the client-side can handle this case well.
Or, if the topic will retire, and you don't want the clients to connect to
it, you can just terminate the topic.
Thanks
Penghui
On Wed, Dec 29, 2021 at 10:39 AM 包子 <wu...@icloud.com.invalid>
wrote:
Issue: https://github.com/apache/pulsar/issues/13488
2021年12月29日 10:3812,包子 <wu...@icloud.com> 写道:
## Motivation
Broker send `CLOSE_PRODUCER/CLOSE_CONSUMER` to client when delete topic,
But client will be reconnect. If config `allowAutoTopicCreation=true` will
trigger create topic again.
https://github.com/apache/pulsar/blob/9f599c9572e5d9b1f15efa6e895e7eb29b284e57/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java#L130-L133
## Goal
Add new commands `STOP_PRODUCER/STOP_CONSUMER`, When the client receives
the command, it only closes without reconnecting.
## API Changes
1. Add command to `BaseCommand`
```java
message BaseCommand {
enum Type {
// ...
STOP_PRODUCER = 64;
STOP_CONSUMER = 65
}
}
```