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
{{ message }}
Repository navigation
Pubsub Question: Manual Acknowledgement outside of MessageReceiver #1981
I'm attempting to ingest data from PubSub via Apache Spark. Without getting into details, I would like to acknowledge messages outside of the MessageReceiver interface. I am not seeing any public methods that acknowledge messages outside of the MessageReceiver interface. https://cloud.google.com/pubsub/docs/pull
Upon deeper inspection, it doesnt look like this use case is supported within this API. It appears that AckId is not visible within the MessageReceiver or AckReplyConsumer interfaces. Without access to this id it does not appear that acknowledgement outside of the receiveMessage method is possible.
@autodidacticon Currently, MessageReceiver is the only way to receive messages, but it might work for your use case. It is possible to save the PubsubMessage and the AckReplyConsumer somewhere, then call ackReplyConsumer.ack() later, outside of the call to receiveMessage. While you cannot get the message ID, you have a "handle" to it. Does this fit your use case?
@pongad Yes, at a high level that approach would work. I've run into serialization issues on the spark side (for some reason I end up having to serialize the closure of the AckReplyConsumer instance) but that does not seem pertinent here.
Activity
autodidacticon commentedon Apr 25, 2017
Upon deeper inspection, it doesnt look like this use case is supported within this API. It appears that
AckIdis not visible within theMessageReceiverorAckReplyConsumerinterfaces. Without access to this id it does not appear that acknowledgement outside of thereceiveMessagemethod is possible.pongad commentedon May 1, 2017
@autodidacticon Currently,
MessageReceiveris the only way to receive messages, but it might work for your use case. It is possible to save thePubsubMessageand theAckReplyConsumersomewhere, then callackReplyConsumer.ack()later, outside of the call toreceiveMessage. While you cannot get the message ID, you have a "handle" to it. Does this fit your use case?autodidacticon commentedon May 1, 2017
@pongad Yes, at a high level that approach would work. I've run into serialization issues on the spark side (for some reason I end up having to serialize the closure of the
AckReplyConsumerinstance) but that does not seem pertinent here.fix: refactor only, add StreamWriter to AppendRowsRequestResponse (#1981
chore(main): release 2.31.1 (#1994)
deps: update dependency com.diffplug.spotless:spotless-maven-plugin t…
chore: bump urllib3 from 2.0.6 to 2.0.7 in /docker/owlbot/java/src (g…