liangjianwen edited a comment on issue #14817:
URL: https://github.com/apache/pulsar/issues/14817#issuecomment-1076190352
> Set consumer `replicateSubscriptionState=true`, eg :
>
> ```
> pulsarClient.newConsumer()
> .topic(topic)
> .subscriptionName(xxx)
> .replicateSubscriptionState(true)
> .subscribe()
> ```
@Technoboy- My code is already like this. But still doesn't work correctly.
Below is my code:
```
PulsarClient pulsarClient =
PulsarClient.builder().serviceUrl(url).statsInterval(1,
TimeUnit.SECONDS).build();
Consumer consumer = pulsarClient.newConsumer()
.topic(topic)
.subscriptionName(subscriptionName)
.subscriptionType(SubscriptionType.Failover)
.receiverQueueSize(1000)
.ackTimeout(30,TimeUnit.SECONDS)
.replicateSubscriptionState(true)
.subscribe();
```
--
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]