Johnnyhooyo commented on issue #11474:
URL: https://github.com/apache/pulsar/issues/11474#issuecomment-889051500
the code almost like this:
```
PulsarClient pulsarClient = PulsarClient.builder()
.serviceUrl("url")
.build();
Consumer<GenericRecord> consumer = pulsarClient
.newConsumer(Schema.AUTO_CONSUME())
.topic("topicName")
.subscriptionName("subName")
.subscriptionType(SubscriptionType.Shared)
.autoUpdatePartitions(true)
.receiverQueueSize(2000)
.subscribe();
Message<GenericRecord> message = consumer.receive(10, TimeUnit.SECONDS);
try {
//do something
throw new RuntimeException();
} catch (Exception e) {
consumer.reconsumeLaterAsync(message, 10, TimeUnit.SECONDS);
}
```
and i will try to make a patch.
--
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]