lorraine1 opened a new issue #5061: deliverAfter(...).sendAsync() -> 
CompletableFuture returning immediately
URL: https://github.com/apache/pulsar/issues/5061
 
 
   **Describe the bug**
   The delayed publishing feature deliverAfter(...) is working good and well 
with sendAsync().  However, the CompletableFuture return of the sendAsync() is 
getting a completion immediately.  Expected is that it will return only after 
the delayed publishing is actually done.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   `producer.newMessage().keyBytes(key).value(value).deliverAfter(10_000, 
MILLISECONDS).sendAsync().thenAccept(messageId -> log.info("done"));`
   
   "done" is getting printed immediately.
   
   **Expected behavior**
   Expected is that the CompletableFuture will only return/get accepted after 
the delayed publishing is actually done, in the example after 10 seconds.
   
   version 2.4.0

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to