You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bahir.apache.org by "Luciano Resende (JIRA)" <ji...@apache.org> on 2019/05/17 22:50:00 UTC
[jira] [Resolved] (BAHIR-203) Pubsub manual acknowledgement
[ https://issues.apache.org/jira/browse/BAHIR-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luciano Resende resolved BAHIR-203.
-----------------------------------
Resolution: Fixed
Assignee: Lukasz Antoniak
Fix Version/s: (was: Spark-2.3.0)
> Pubsub manual acknowledgement
> ------------------------------
>
> Key: BAHIR-203
> URL: https://issues.apache.org/jira/browse/BAHIR-203
> Project: Bahir
> Issue Type: Improvement
> Components: Spark Streaming Connectors
> Reporter: Danny Tachev
> Assignee: Lukasz Antoniak
> Priority: Minor
> Fix For: Spark-2.4.0
>
>
> Hi,
> We have a use case where acknowledgement has to be sent at a later stage when streaming data from google pubsub. Any chance for the acknowledgement in PubsubReceiver to be made optional and ackId to be included in the SparkPubsubMessage model?
> Example:
> {code:java}
> store(receivedMessages
> .map(x => {
> val sm = new SparkPubsubMessage
> sm.message = x.getMessage
> sm.ackId = x.getAckId
> sm
> })
> .iterator)
> if ( ... ) {
> val ackRequest = new AcknowledgeRequest()
> ackRequest.setAckIds(receivedMessages.map(x => x.getAckId).asJava)
> client.projects().subscriptions().acknowledge(subscriptionFullName, ackRequest).execute()
> }{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)