You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to use pulsar-rs for one of our projects. However, I'm having trouble reading the "last message" for the Pulsar topic given.
Can I please get some pointers on how to do that? In the Java/Scala version, I was able to do it by setting the startMessageId to MessageId.latest:
valreader= pulsarClient
.newReader(Schema.BYTES)
.topic(topic)
.startMessageIdInclusive()
.startMessageId(MessageId.latest) // This could be set to "MessageId.latest"
.subscriptionName(subscriptionName)
.readCompacted(readCompacted)
.create()
However, with pulsar-rs, I'm a bit lost...
let builder = pulsar.reader().with_topic(&self.topic).with_subscription_type(SubType::Exclusive).with_subscription("dodo-x").with_start_message_id(?)// ??? - this also does not exists?.with_options(ConsumerOptions::default()// with_start_message_id ??? - this does not exist?.with_initial_position(InitialPosition::Latest).durable(false).read_compacted(false));
Any pointer on this subject would be highly appreciated. Regards, and have a lovely day!
The text was updated successfully, but these errors were encountered:
Hey!
I would love to use
pulsar-rs
for one of our projects. However, I'm having trouble reading the "last message" for the Pulsar topic given.Can I please get some pointers on how to do that? In the Java/Scala version, I was able to do it by setting the
startMessageId
toMessageId.latest
:However, with
pulsar-rs
, I'm a bit lost...Any pointer on this subject would be highly appreciated. Regards, and have a lovely day!
The text was updated successfully, but these errors were encountered: