You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/06/16 18:05:24 UTC
[pulsar-site] branch main updated: Docs sync done from apache/pulsar(#bb0bfb9)
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new d59c9100886 Docs sync done from apache/pulsar(#bb0bfb9)
d59c9100886 is described below
commit d59c9100886c719e3aa0854066986f9ff93e6c04
Author: Pulsar Site Updater <de...@pulsar.apache.org>
AuthorDate: Thu Jun 16 18:05:20 2022 +0000
Docs sync done from apache/pulsar(#bb0bfb9)
---
site2/website-next/docs/performance-pulsar-perf.md | 2 +-
site2/website-next/docs/txn-use.md | 16 ++++++----------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/site2/website-next/docs/performance-pulsar-perf.md b/site2/website-next/docs/performance-pulsar-perf.md
index 2e8a510f840..258fcd4da97 100644
--- a/site2/website-next/docs/performance-pulsar-perf.md
+++ b/site2/website-next/docs/performance-pulsar-perf.md
@@ -152,7 +152,7 @@ For the latest and complete information about `pulsar-perf`, including commands,
## Transactions
-This section shows how Pulsar Perf runs transactions. For more information, see [Pulsar transactions](txn-why).
+This section shows how Pulsar Perf runs transactions. For more information, see [Pulsar transactions](/txn-why).
### Use transaction
diff --git a/site2/website-next/docs/txn-use.md b/site2/website-next/docs/txn-use.md
index a8f21b766a5..8a90a42c219 100644
--- a/site2/website-next/docs/txn-use.md
+++ b/site2/website-next/docs/txn-use.md
@@ -69,12 +69,9 @@ This section provides an example of how to use the transaction API to send and r
```
PulsarClient client = PulsarClient.builder()
-
- .serviceUrl(“pulsar://localhost:6650”)
-
- .enableTransaction(true)
-
- .build();
+ .serviceUrl(“pulsar://localhost:6650”)
+ .enableTransaction(true)
+ .build();
```
@@ -96,12 +93,11 @@ Let’s walk through this example step by step.
```
-Consumer<byte[]> sinkConsumer = pulsarClient
+Consumer<byte[]> consumer = pulsarClient
.newConsumer()
.topic(transferTopic)
- .subscriptionName("sink-topic")
-
-.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
+ .subscriptionName("transaction-sub")
+ .subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
.subscriptionType(SubscriptionType.Shared)
.enableBatchIndexAcknowledgment(true) // enable batch index acknowledgement
.subscribe();