I have a short project where I push a number of messages (~1000) and then I try to process them on a single thread, but I still receive duplicates.
Is this a desired behavior of PubSub?
this is the code to create a subscriber
ExecutorProvider executorProvider =
InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(1).build();
// create subscriber
subscriber = Subscriber.newBuilder(subscriptionName, messageReceiver).setExecutorProvider(executorProvider).build();
subscriber.startAsync();
Here is the demo: https://github.com/andonescu/play-pubsub
I've pushed 1000 messages, each process took 300 milliseconds (delay added intentionally) then ack() was called. The ack time on subscription is 10. Based on all these I should not receive duplicate messages, but I've received more than 10% of those sent.
here is the log: https://github.com/andonescu/play-pubsub/blob/master/reports/1000-messages-reader-status
I've added same question on https://github.com/GoogleCloudPlatform/pubsub/issues/182