[ 
https://issues.apache.org/jira/browse/BEAM-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Logan HAUSPIE updated BEAM-5806:
--------------------------------
    Description: 
By using the PubsubIO to read from or write to Pub/Sub we are obliged to use 
the PubsubJsonClient to interact with the Pub/Sub API.

This PubsubJsonClient encode the message in base 64 and increase the zise of 
this one by 30% and there is no way to change the PubsubClient used by PubsubIO.

 

What I suggest is to allow developper to change the PubsubClientFactory by 
specifying it at the definition-time like the following:

```

PubsubIO.Read<String> read =
 PubsubIO.readStrings()
 .fromTopic(StaticValueProvider.of(topic))
 .withFactory(PubsubGrpcClient.FACTORY)
 .withTimestampAttribute("myTimestamp")
 .withIdAttribute("myId");

```

> Allow to change the PubsubClientFactory when using PubsubIO
> -----------------------------------------------------------
>
>                 Key: BEAM-5806
>                 URL: https://issues.apache.org/jira/browse/BEAM-5806
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-gcp
>            Reporter: Logan HAUSPIE
>            Assignee: Chamikara Jayalath
>            Priority: Minor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> By using the PubsubIO to read from or write to Pub/Sub we are obliged to use 
> the PubsubJsonClient to interact with the Pub/Sub API.
> This PubsubJsonClient encode the message in base 64 and increase the zise of 
> this one by 30% and there is no way to change the PubsubClient used by 
> PubsubIO.
>  
> What I suggest is to allow developper to change the PubsubClientFactory by 
> specifying it at the definition-time like the following:
> ```
> PubsubIO.Read<String> read =
>  PubsubIO.readStrings()
>  .fromTopic(StaticValueProvider.of(topic))
>  .withFactory(PubsubGrpcClient.FACTORY)
>  .withTimestampAttribute("myTimestamp")
>  .withIdAttribute("myId");
> ```



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to