GitHub user lhotari added a comment to the discussion: async/sync mode in 
pulsar producer and consumer

@ragaur-tibco For understanding the "internal process", it is good to start by 
reading [the high level documentation for the Pulsar binary 
protocol](https://pulsar.apache.org/docs/3.2.x/developing-binary-protocol/). 
For example, the [description of the 
producer](https://pulsar.apache.org/docs/3.2.x/developing-binary-protocol/#producer)
 gives good context to understand how the producer works. There's a 
presentation ["Deep Dive into the Pulsar Binary 
Protocol"](https://www.youtube.com/watch?v=ONyld7Da-rw) by @cbornet which 
explains a lot more around the binary protocol.
Pulsar's Java client and Pulsar broker use Netty to handle the network 
communications. If you really want to get into internal, it helps to get an 
understanding of Netty. One of the rare books on the topic is "[Netty in 
Action](https://www.manning.com/books/netty-in-action)".

> I don't have any expectations or requirements I just want to know how to test 
> the both modes any practical approach and anything in Pulsar SDK logs so that 
> I can understand the internal process

As I have already mentioned in my previous comments, testing Pulsar is usually 
about validating some expectation, for example validating that a system meets 
both functional and non-functional requirements. There might be a test plan 
with test cases to make this well defined. Perhaps you are meaning more about 
experimentation when you say to "test the both modes"?
One possible approach is to look at the unit tests in the Pulsar source code 
and extract something out of that? For example, [this test class contains a lot 
of different test 
cases](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java).
With ChatGPT, you can also generate a lot of examples and just try to run them 
in the IDE with unit tests, if your main purpose is to experiment with things 
and learn Pulsar.
For Pulsar testing in general, you might get good ideas [from some conference 
talks](https://www.youtube.com/@streamnative/search?query=testing). I've done a 
talk ["Validating Apache Pulsar’s Behavior Under Failure Conditions 
"](https://www.youtube.com/watch?v=98wT5ePSKj0) on this subject, but it's a 
fairly high-level systems testing talk so it might not be practical for your 
case. 




GitHub link: 
https://github.com/apache/pulsar/discussions/22382#discussioncomment-8993754

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to