Siddhi Google Pub/Sub: acknowledge message only if Siddhi app execution for event succeeds

38 Views Asked by At

we are using the Google Pub/Sub extension as source for our Siddhi application. The plugin directly acknowledges the reception of a message containing the event data.

Hence, if processing of the message within the Siddhi app fails, it is acknowledged and not moved back to the topic.

Do you know if there is a way to ack. the message iff the flow through the Siddhi app succeeds?

Thanks a lot!

Cheers, Sebastian

1

There are 1 best solutions below

3
Chiran Fernando On

I believe acknowledgment should come after consuming the event in https://github.com/siddhi-io/siddhi-io-googlepubsub/blame/master/component/src/main/java/io/siddhi/extension/io/googlepubsub/source/GooglePubSubMessageReceiver.java#L60.

Please send a PR with the fix if possible so that the Siddhi maintainers can check and merge the fix tracked under https://github.com/siddhi-io/siddhi-io-googlepubsub/issues/21