From 87f424d8e26c0322a68593abeaee25ea2383e095 Mon Sep 17 00:00:00 2001 From: T2938 Date: Mon, 4 Mar 2024 14:42:27 +0800 Subject: [PATCH] The sample code of transaction is missing ".build();" --- docs/txn-use.md | 2 +- versioned_docs/version-3.0.x/txn-use.md | 1 + versioned_docs/version-3.1.x/txn-use.md | 1 + versioned_docs/version-3.2.x/txn-use.md | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/txn-use.md b/docs/txn-use.md index 3be260ac1dc4..3ddb0b2d4e42 100644 --- a/docs/txn-use.md +++ b/docs/txn-use.md @@ -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 producerBuilder = client.newProducer(Schema.STRING); diff --git a/versioned_docs/version-3.0.x/txn-use.md b/versioned_docs/version-3.0.x/txn-use.md index 324a8dc67d6f..c74dc1ecb4a7 100644 --- a/versioned_docs/version-3.0.x/txn-use.md +++ b/versioned_docs/version-3.0.x/txn-use.md @@ -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 producerBuilder = client.newProducer(Schema.STRING); diff --git a/versioned_docs/version-3.1.x/txn-use.md b/versioned_docs/version-3.1.x/txn-use.md index 324a8dc67d6f..c74dc1ecb4a7 100644 --- a/versioned_docs/version-3.1.x/txn-use.md +++ b/versioned_docs/version-3.1.x/txn-use.md @@ -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 producerBuilder = client.newProducer(Schema.STRING); diff --git a/versioned_docs/version-3.2.x/txn-use.md b/versioned_docs/version-3.2.x/txn-use.md index 615e2eab285d..3ddb0b2d4e42 100644 --- a/versioned_docs/version-3.2.x/txn-use.md +++ b/versioned_docs/version-3.2.x/txn-use.md @@ -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 producerBuilder = client.newProducer(Schema.STRING);