From ac3dcd8b285c2968b4cb2f1b1e3f6db26ed5e598 Mon Sep 17 00:00:00 2001 From: Yajun Zhao <92070379+zhaoyajun2009@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:30:40 +0800 Subject: [PATCH] The sample code of transaction is missing ".build();" (#819) * The sample code of transaction is missing ".build();" --------- Co-authored-by: T2938 --- docs/txn-use.md | 1 + 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(+) diff --git a/docs/txn-use.md b/docs/txn-use.md index 615e2eab285d..3ddb0b2d4e42 100644 --- a/docs/txn-use.md +++ b/docs/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); 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);