pulsar-client-python
pulsar-client-python copied to clipboard
pulsar.Client() needs option to supress STDOUT
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.
The issue had no activity for 30 days, mark with Stale label.
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.
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?