pulsar-client-python icon indicating copy to clipboard operation
pulsar-client-python copied to clipboard

pulsar.Client() needs option to supress STDOUT

Open gantryyork opened this issue 3 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe. This isn't necessarily a problem, but requires a workaround

Describe the solution you'd like Simply add client = pulsar.Client(ip, stdout=False)

Describe alternatives you've considered Otherwise I have to manually supress stdout when I call pulsar.Client() or producer.send()

Additional context Add any other context or screenshots about the feature request here.

gantryyork avatar Jun 22 '22 19:06 gantryyork

The issue had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Jul 23 '22 02:07 github-actions[bot]

Hello guys, I would like to take up this issue. I'm new to this, so please help me out with which part of the code I should make changes to.

Abhiramkns avatar May 02 '23 13:05 Abhiramkns

I am trying to see what will be printed on stdout when the producer sends a message, so I wrote code like this:

public class Producer {
    public static void main(String[] args) throws PulsarClientException {
        PulsarClient client = PulsarClient.builder()
            .serviceUrl("pulsar://localhost:6650")
            .build();
        org.apache.pulsar.client.api.Producer<String> producer = client.newProducer(Schema.STRING)
            .topic("my-topic")
            .create();

        // You can then send messages to the broker and topic you specified:
        producer.send("My message");
        producer.close();
        client.close();
    }
}

However, I see nothing in stdout. Is there anything wrong here?

RainYuY avatar Aug 10 '23 11:08 RainYuY