in flink-connector/flink-connector-gcp-pubsub/src/main/java/com/google/pubsub/flink/internal/source/reader/PubSubNotifyingPullSubscriber.java [86:94]
public synchronized Optional<PubsubMessage> pullMessage() throws Throwable {
if (permanentError.isPresent()) {
throw permanentError.get();
}
if (messages.isEmpty()) {
return Optional.absent();
}
return Optional.of(messages.pop());
}