You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 22:52:02 UTC

[GitHub] [beam] kennknowles opened a new issue, #19162: Allow to change the PubsubClientFactory when using PubsubIO

kennknowles opened a new issue, #19162:
URL: https://github.com/apache/beam/issues/19162

   When we use PubSub to push or pull messages, we currently have no choice of serialization implementation because PubsubIO use internaly the *_PubsubJsonClient.FACTORY_* of type _*PubsubJsonClientFactory*_ to serialize or deserialize messages.
   
   It should be nice to be able to set a different factory (e.g. *_PubsubGrpcClientFactory_*) to decrease the size of messages (and then decrease the price of using Pubsub).
   
    
   
   I guess It could be possible to write something like:
   
   `PubsubIO.Write<PubsubMessage> write =`
    `    PubsubIO.writeMessages()`
    `            .to("projects/project/topics/topic")`
    `            *.withFactory(PubsubGrpcClient.FACTORY)*`
    `            .withTimestampAttribute("timestamp")``;`
   
   or 
   
   `PubsubIO.Read<PubsubMessage> read = `
    `    PubsubIO.readMessages()`
    `            .fromSubscription("projects/project/subscriptions/name")`
    `            *.withFactory(PubsubGrpcClient.FACTORY)*`
    `            .withTimestampAttribute("timestamp");`
   
    
   
   Imported from Jira [BEAM-5676](https://issues.apache.org/jira/browse/BEAM-5676). Original Jira may contain additional context.
   Reported by: lhauspie.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org