There could be any number of reasons for that, it's hard to say without knowing how you're running the pipeline. There's a pretty good chance the message is indeed being printed, but not on a console you can see easily. Personally for this kind of testing I tend to use metrics to get quick feedback rather than logging output (if you do log I'd recommend switching to a logging library rather than using println for a variety of reasons)
Best, B On Fri, Oct 7, 2022 at 2:18 AM phani geeth <[email protected]> wrote: > 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, <[email protected]> > 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 <[email protected]> >> 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 >>> >>> >>> >>
