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
If the listener is unavailable or state is not ready the function should return exception.
Actual behavior
It doesn't, as seen below the return statement is missing before FutureUtil
@Override
public CompletableFuture<Message> receiveAsync() {
if (listener != null) {
FutureUtil.failedFuture(new PulsarClientException.InvalidConfigurationException(
"Cannot use receive() when a listener has been set"));
}
switch (getState()) {
case Ready:
case Connecting:
break; // Ok
case Closing:
case Closed:
FutureUtil.failedFuture(new PulsarClientException.AlreadyClosedException("Consumer already closed"));
case Failed:
case Uninitialized:
FutureUtil.failedFuture(new PulsarClientException.NotConnectedException());
}
return internalReceiveAsync();
}
Steps to reproduce
Code Inspection
System configuration
Pulsar version: x.y
The text was updated successfully, but these errors were encountered:
Expected behavior
If the listener is unavailable or state is not ready the function should return exception.
Actual behavior
It doesn't, as seen below the return statement is missing before
FutureUtil
Steps to reproduce
Code Inspection
System configuration
Pulsar version: x.y
The text was updated successfully, but these errors were encountered: