Until now, if underlying watcher for given consumer did not have any pending messages, it would indefinitely wait for the first one. This commit improves it by checking message pending count on initial consumer info, and returning None if there are no messages.
Until now, if underlying watcher for given consumer did not have any pending messages, it would indefinitely wait for the first one. This commit improves it by checking message pending count on initial consumer info, and returning
None
if there are no messages.Signed-off-by: Tomasz Pietrek tomasz@nats.io