Skip to content

Commit

Permalink
The sample code of transaction is missing ".build();" (#819)
Browse files Browse the repository at this point in the history
* The sample code of transaction is missing ".build();"

---------

Co-authored-by: T2938 <[email protected]>
  • Loading branch information
zhaoyajun2009 and T2938 committed Mar 4, 2024
1 parent 1a49591 commit ac3dcd8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/txn-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ To use Pulsar transaction API, complete the following steps.
// Step 3: create a Pulsar client and enable transactions.
.enableTransaction(true)
.serviceUrl(jct.serviceUrl)
.build();
// Step 4: create three producers to produce messages to input and output topics.
ProducerBuilder<String> producerBuilder = client.newProducer(Schema.STRING);
Expand Down
1 change: 1 addition & 0 deletions versioned_docs/version-3.0.x/txn-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Currently, [Pulsar transaction API](/api/admin/) is available in **Pulsar 2.8.0
// Step 3: create a Pulsar client and enable transactions.
.enableTransaction(true)
.serviceUrl(jct.serviceUrl)
.build();
// Step 4: create three producers to produce messages to input and output topics.
ProducerBuilder<String> producerBuilder = client.newProducer(Schema.STRING);
Expand Down
1 change: 1 addition & 0 deletions versioned_docs/version-3.1.x/txn-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Currently, [Pulsar transaction API](/api/admin/) is available in **Pulsar 2.8.0
// Step 3: create a Pulsar client and enable transactions.
.enableTransaction(true)
.serviceUrl(jct.serviceUrl)
.build();
// Step 4: create three producers to produce messages to input and output topics.
ProducerBuilder<String> producerBuilder = client.newProducer(Schema.STRING);
Expand Down
1 change: 1 addition & 0 deletions versioned_docs/version-3.2.x/txn-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ To use Pulsar transaction API, complete the following steps.
// Step 3: create a Pulsar client and enable transactions.
.enableTransaction(true)
.serviceUrl(jct.serviceUrl)
.build();
// Step 4: create three producers to produce messages to input and output topics.
ProducerBuilder<String> producerBuilder = client.newProducer(Schema.STRING);
Expand Down

0 comments on commit ac3dcd8

Please sign in to comment.