Debian Codegraph @

examples/txn_producer/README.md

raw
1 # Transactional producer example
2
3 This example shows you how to use the Sarama transactional producer. The example simply starts some goroutine that produce endlesslly on associated topic.
4
5 ```bash
6 $ go run main.go -brokers="127.0.0.1:9092" -topic "sarama" -producers 10 -records-number 10000
7 ```
8
9 To ensure transactional-id uniqueness it implement some ***ProducerProvider*** that build a producer appending an integer that grow when producer is created.
10 You can also see record-rate each 5s printing on stdout.