Thanks Byron for the quick response it worked by creating Serializable Function and generating client inside it.
One more help is how to display pulsar message while adding DoFn in pipeline it's not printing messages, able to see pipeline is recieving messages but not able to display. Class MessagePrint extends DoFn<PulsarMessage,String>{ @ProcessElement public void processElement(ProcessContext c){ System.out.println(c.element); System.out.println(c.element().getMessageRecord()); }} Added this DoFn in pipeline after PulsarIO but not able to print any message. Regards, Phani Geeth On Fri, 7 Oct, 2022, 2:29 am Byron Ellis via user, <user@beam.apache.org> wrote: > Hi Phani, > > I believe what you want to do here is construct the PulsarClient object > within an implementation of SerializableFunction so that it can be executed > remotely rather than constructing the client in your main function. That > will mean ensuring that you have access to your certificate files from > those remote resources as well. > > Best, > B > > On Thu, Oct 6, 2022 at 3:19 AM Phani Geeth <bvpgeeth0...@gmail.com> wrote: > >> Hi Team, >> >> >> >> I am using native PulsarIO to connect existing pulsar server with ssl >> certification. But while adding withPulsarClient in pipeline I am getting >> cast error. >> >> >> >> More details and code is posted in below stackoverflow link >> >> >> https://stackoverflow.com/questions/73937922/not-able-to-connect-to-pulsario-using-apache-beam-java-sdk >> >> >> >> >> >> >> >> Regards, >> >> >> >> Phani Geeth >> >> >> >> >> >> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for >> Windows >> >> >> >