Skip to content

Commit

Permalink
The sample code of transaction is missing ".build();"
Browse files Browse the repository at this point in the history
  • Loading branch information
T2938 committed Mar 4, 2024
1 parent 6bff37c commit 87f424d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/txn-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +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()
.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 87f424d

Please sign in to comment.