Skip to main content

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 or standalone.conf file.


This example enables batch messages ack in transactions in the consumer builder.

Consumer<byte[]> consumer = pulsarClient
.enableBatchIndexAcknowledgment(true) // enable batch index acknowledgment

Enable authentication

If you want to enable authentication with transactions, follow the steps below.

  1. Grant "consume" permission to the persistent://pulsar/system/transaction_coordinator_assign topic.

  2. Configure authentication in a Pulsar client.

Guarantee exactly-once semantics

If you want to guarantee exactly-once semantics with transactions, you can enable message deduplication at the broker, namespace, or topic level.