Processing guarantees Preview

Apply at-most-once, at-least-once, or effectively-once delivery semantics to Pulsar Functions

Pulsar version 2.0

The documentation that you’re reading is for the 2.0 release of Apache Pulsar. For more information on Pulsar 2.0, see this guide.

Pulsar Functions provides three different messaging semantics that you can apply to any function:

Delivery semantics Description
At-most-once delivery Each message that is sent to the function will most likely be processed but also may not be (hence the “at most”)
At-least-once delivery Each message that is sent to the function could be processed more than once (hence the “at least”)
Effectively-once delivery Each message that is sent to the function will have one output associated with it

Applying processing guarantees to a function

You can set the processing guarantees for a Pulsar Function when you create the Function. This pulsar-function create command, for example, would apply effectively-once guarantees to the Function:

$ bin/pulsar-admin functions create \
  --processingGuarantees EFFECTIVELY_ONCE \
  # Other function configs

The available options are:


By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the --processingGuarantees flag, then the function will provide at-most-once guarantees.

Updating the processing guarantees of a function

You can change the processing guarantees applied to a function once it’s already been created using the update command. Here’s an example:

$ bin/pulsar-admin functions update \
  --processingGuarantees ATMOST_ONCE \
  # Other function configs