-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
zymap/pulsar
#11Labels
area/brokertype/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug
Description
Describe the bug
After fix #7118 on BUG #7046 another BUG was introduced as initial subscription position is ignored with NonDurable subscriptions.
To Reproduce
final Producer<byte[]> producer = client.newProducer().topic(topicUri).create();
// We produce one message
producer.newMessage().key("1").value("Hello world!".getBytes()).send();
producer.close();
final Consumer<byte []> consumer = client.newConsumer().topic(topicUri)
.batchReceivePolicy(BatchReceivePolicy.builder().maxNumMessages(batchSize)
.timeout(timeoutMillis, TimeUnit.MILLISECONDS).build())
.readCompacted(true)
.subscriptionMode(SubscriptionMode.NonDurable) // Commenting out this line works
.startMessageIdInclusive().subscriptionType(SubscriptionType.Exclusive).subscriptionName("test")
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest).subscribe();
// This should receive produced message above but nothing is returned
Message<byte[]> msg = consumer.receive(1, TimeUnit.SECONDS);
Expected behavior
We expect NonDurable subscriptions to work like normal ones allowing positioning subscription.
Screenshots
Desktop (please complete the following information):
- Windows with Docker Destktop
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/brokertype/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug