aintJoshinya opened a new pull request, #110:
URL: https://github.com/apache/pulsar-dotpulsar/pull/110

   the current "hello world" will not show a consumed message the very first 
time it is run. On subsequent runs, it will work, but it isn't entirely clear 
from the code alone why it works on subsequent runs.
   
   I don't entirely understand why the order matters here, but I believe it 
isn't showing the consumed message on the first run because the subscription is 
created after the producer sends a message. It seems that by default, a new 
subscription will not consume messages that are created before it.
   
   An alternative solution would be to create the consumer with the 
"InitialPosition" option set to Earliest 
(".InitialPosition(SubscriptionInitialPosition.Earliest"), but I think it's 
preferable to minimize optional configuration in a hello world like this.


-- 
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]

Reply via email to