GitHub user merlimat added a comment to the discussion: recycled already -
exception
I think we already have tests for that scenario, though a simple one works
fine:
```java
@Cleanup
Producer<String> producer = pulsarClient.newProducer(Schema.STRING)
.topic(topic)
.create();
@Cleanup
Consumer<String> consumer = pulsarClient.newConsumer(Schema.STRING)
.topic(topic)
.subscriptionName("sub")
.subscriptionType(SubscriptionType.Shared)
.ackTimeout(1, TimeUnit.SECONDS)
.subscribe();
producer.send("hello-1");
producer.send("hello-2");
Message<String> msg1 = consumer.receive();
// Wait for ack-timeout to trigger
Thread.sleep(10 * 1000);
consumer.acknowledge(msg1);
```
GitHub link:
https://github.com/apache/pulsar/discussions/21929#discussioncomment-8191996
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]