[ 
https://issues.apache.org/jira/browse/BEAM-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804770#comment-16804770
 ] 

Ismaël Mejía commented on BEAM-3312:
------------------------------------

We need to add the methods to the `ConnectionConfiguration` object not to the 
Read/Write transforms, this is simpler and keeps the nice builder style, only 
difference is that the connection building stays in one place so it is less 
error-prone.

> Add IO convenient "with" methods
> --------------------------------
>
>                 Key: BEAM-3312
>                 URL: https://issues.apache.org/jira/browse/BEAM-3312
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-mqtt
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>              Labels: triaged
>
> Now, for instance, {{MqttIO}} requires a {{ConnectionConfiguration}} object 
> to pass the URL and topic name. It means, the user has to do something like:
> {code}
> MqttIO.read()             
> .withConnectionConfiguration(MqttIO.ConnectionConfiguration.create("tcp://localhost:1883",
>  "CAR"))
> {code}
> It's pretty verbose and long. I think it makes sense to provide convenient 
> "direct" method allowing to do:
> {code}
> MqttIO.read().withUrl().withTopic()
> {code}
> or even:
> {code}
> MqttIO.read().withConnection("url",  "topic")
> {code}
> The same apply for some other IOs (JMS, ...).



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

Reply via email to