Skip to content

Apache Pulsar Channel Binding v0.1.0 ​

The Apache Pulsar channel binding is used to define the configuration of a Pulsar topic and its associated namespace policies.

Overview ​

This binding object is the most detailed in the Pulsar bindings, allowing you to specify the administrative policies that govern a topic's behavior, such as its persistence, retention, and geo-replication.

The full, structured name of a Pulsar topic is {persistence}://{tenant}/{namespace}/{topic}. This binding defines the namespace and persistence parts, while the tenant is set in the Server Binding and the topic is the AsyncAPI channel address.

Channel Properties ​

PropertyTypeRequiredDescription
bindingVersionstringNoBinding version (defaults to 0.1.0).
namespacestringYesThe Pulsar namespace the channel is associated with.
persistencestringYesDefines the persistence of the topic. Can be persistent or non-persistent.
compactionintegerNoTopic compaction threshold in megabytes.
geo-replicationarrayNoA list of cluster names for geo-replication.
retentionobjectNoRetention policy for the topic.
ttlintegerNoMessage time-to-live in seconds.
deduplicationbooleanNoEnable or disable message deduplication.

retention Object ​

PropertyTypeRequiredDescription
timeintegerNoRetention time in minutes. 0 disables time-based retention.
sizeintegerNoRetention size in megabytes. 0 disables size-based retention.

Example ​

Persistent, Replicated Topic with Retention ​

This example defines a channel that maps to a persistent Pulsar topic. The topic is in the billing namespace, is replicated to two other clusters, and has a 7-day time-based retention policy.

yaml
channels:
  payment-events:
    address: 'new-payments'
    bindings:
      pulsar:
        bindingVersion: '0.1.0'
        namespace: 'billing'
        persistence: 'persistent'
        compaction: 100
        deduplication: true
        geo-replication:
          - 'us-west-cluster'
          - 'eu-central-cluster'
        retention:
          time: 10080 # 7 days in minutes
          size: 0

Changelog ​

Version 0.1.0 ​

  • Initial release of the Apache Pulsar channel binding with a comprehensive set of administrative policies.