You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bahir.apache.org by "Danny Tachev (JIRA)" <ji...@apache.org> on 2019/04/09 11:34:00 UTC

[jira] [Created] (BAHIR-203) Pubsub manual acknowledgement

Danny Tachev created BAHIR-203:
----------------------------------

             Summary: 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
             Fix For: Spark-2.4.0, Spark-2.3.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:language=scala}
{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)