[Doc] Improve pulsar-perf transaction example
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### What issue do you find in Pulsar docs?
When using pulsar-perf transaction is not trivial to understand how you can make it working because the consume topic needs to contains enough messages to consume and the formula is:
message to write before the command = --numSubscriptions * --numMessage-perTransaction-consume
### What is your suggestion?
I suggest to prepend the pulsar-perf produce command before the example and to better explain how the tool works
Currently there's a info box but it's not very clear, a working example is far better for a user.
It could be something like that:
*Transactions*
The transction tool will consume from the `--topics-c` topics and it will produce a message to `--topics-p` in the same transaction. Note that the tool expects the `--topics-c` topics contains at least `--numSubscriptions * --numMessage-perTransaction-consume` messages.
Prepare the topic:
`bin/pulsar-perf produce -m 50 --exit-on-failure -t 1 myConsumerTopic`
Command:
`bin/pulsar-perf transaction --topics-c myConsumerTopic --topics-p MyproduceTopic -threads 1 -ntxn 50 -ss testSub -nmp 1 -nmc 1`
### Do you have any references?
https://pulsar.apache.org/docs/next/performance-pulsar-perf/#transactions
### Would you like to fix this issue?
not now
### Note
- [X] I have researched my question.
Contributor guide
Research direction
Start at the Pulsar performance documentation's Transactions section and review the existing info box. Add the proposed produce command, transaction command, and explanation of the required message count; done means the example is self-contained and explains the consume-topic formula clearly.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100