Hi,

I am writing a DoFn that writes messages to a mqtt. I was planning to 
initialize the mqtt client inside @Setup method, but noticed that 
Context/PipelineOptions is not available to the @Setup annotated method. 
The mqtt url is supplied as a pipelineOption and it is needed for 
initialization.

Is this intentional not to provide Context/PipelineOptions in @Setup ?  
What is the best practice to initialize the client in my case?. ( 
startBundle or processElement would be called multiple times, so I didnt 
want to write initialization code in there)


P.S. I couldn't use the MqttIO as it does not support dynamic topics.


Thanks,

Jins George


Reply via email to