You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/17 06:53:48 UTC
[GitHub] [pulsar] codelipenghui commented on issue #7395: Consumer.getLastMessageId() returns invalid MessageId
codelipenghui commented on issue #7395:
URL: https://github.com/apache/pulsar/issues/7395#issuecomment-728727340
@fmiguelez I try to reproduce the issue, but can't be reproduced on the master branch, Here is my test code :
```
final String topicName = "persistent://my-property/my-ns/testGetLastMessageId";
final String subName = "my-sub";
Producer<String> producer = pulsarClient.newProducer(Schema.STRING)
.topic(topicName).create();
producer.send("Hello Pulsar");
Consumer<String> consumer = pulsarClient.newConsumer(Schema.STRING)
.topic(topicName).subscriptionName(subName)
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
.subscribe();
MessageId lastMsgId = consumer.getLastMessageId();
System.out.println(lastMsgId);
```
Output:
```
3:0:-1
```
Could you please provide more information about your reproduce steps? I will move this issue to milestone 2.8.0 first.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org