Anonymitaet commented on code in PR #501: URL: https://github.com/apache/pulsar-site/pull/501#discussion_r1159199450
########## docs/txn-advanced-features.md: ########## @@ -0,0 +1,45 @@ +--- +id: txn-advanced-features +title: Advanced features +sidebar_label: "Advanced features" +--- + +You can use the following advanced features with transactions in Pulsar. + +## Ack batch messages + +If you want to acknowledge batch messages with transactions, set `acknowledgmentAtBatchIndexLevelEnabled` to `true` in the [`broker.conf`](https://github.com/apache/pulsar/blob/master/conf/broker.conf) or [`standalone.conf`](https://github.com/apache/pulsar/blob/master/conf/standalone.conf) file. + + +```conf +acknowledgmentAtBatchIndexLevelEnabled=true +``` + +This example enables batch messages ack in transactions in the consumer builder. + +```java +Consumer<byte[]> consumer = pulsarClient + .newConsumer() + .topic(transferTopic) + .subscriptionName("transaction-sub") + .subscriptionInitialPosition(SubscriptionInitialPosition.Earliest) + .subscriptionType(SubscriptionType.Shared) + .enableBatchIndexAcknowledgment(true) // enable batch index acknowledgment + .subscribe(); +``` + +## Enable authentication Review Comment: @congbobo184 Oh I see, you mean users can enable all Authentication methods. So I plan to set it as https://pulsar.apache.org/docs/next/security-overview/#authentication, which directs users to all methods as well. WDYT? <img width="1431" alt="image" src="https://user-images.githubusercontent.com/50226895/230249813-98a92636-2c9c-4544-bb76-e07a7aa071f3.png"> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
