Ceyword opened a new issue, #169:
URL: https://github.com/apache/pulsar-dotpulsar/issues/169
Hello,
I have the below code:
> await Task.Run(async () =>
{
const string myTopic = "TestScheduling";
await using var client =
DotPulsar.PulsarClient.Builder().ServiceUrl(new
Uri("pulsar://127.0.0.1:6650")).Build();
await using var producer =
client.NewProducer(DotPulsar.Schema.String).Topic(myTopic).Create();
await producer.Send("Hello Pulsar now");
await producer.Send(new DotPulsar.MessageMetadata {
DeliverAtTimeAsDateTime = DateTime.UtcNow.AddMinutes(10) }, "Hello Pulsar after
10 minutes");
await using var consumer = client.NewConsumer(DotPulsar.Schema.String)
.SubscriptionName("MySubscription")
.Topic(myTopic)
.InitialPosition(DotPulsar.SubscriptionInitialPosition.Latest)
.Create();
var messages = consumer.Messages();
await foreach (var message in messages)
{
Console.WriteLine($"Received:
{Encoding.UTF8.GetString(message.Data.ToArray())} @ {DateTime.UtcNow}");
await consumer.Acknowledge(message);
}
});
I expect the second message to be delivered after about ten minutes. Both
got delivered, immediately. What am I missing to successfully implement delayed
message delivery?
Thank you
--
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]