Skip to main content
Version: 0.7.x
input/pulsarINPUTBUFFERPROCESSOROUTPUT

Pulsar

The Pulsar input subscribes to an Apache Pulsar topic and supports four subscription types — exclusive / shared / failover / key_shared — with optional Token or OAuth2 authentication. A fresh subscription starts from the earliest message (the existing backlog is consumed, matching the Kafka input default); acknowledgements always complete within a bounded time, even when the broker stops delivering new messages. As a channel-based input it follows the engine's cancellation-safety contract: dropping a pending read never loses an already-decoded message (see Input Delivery Semantics).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "pulsar"
service_urlstringyes—Pulsar service URL, e.g. pulsar://host:6650 or pulsar+ssl://host:6651; cluster URLs separated by commas
topicstringyes—Topic, e.g. persistent://tenant/namespace/topic or a short name
subscription_namestringyes—Subscription name
subscription_typestringno"exclusive"Subscription type: exclusive / shared / failover / key_shared
authobjectno—Authentication configuration, see table below (tagged enum)
retry_configobjectno—Retry configuration, see table below
tlsobjectno—TLS configuration, see table below

auth​

auth is a tagged enum (distinguished by the type field) with two mutually exclusive forms:

FieldTypeRequiredDescription
typestringyes"token" or "o_auth2"
tokenstringyes (token)Token string
issuer_urlstringyes (o_auth2)OAuth2 issuer URL
credentials_urlstringyes (o_auth2)OAuth2 credentials URL
audiencestringyes (o_auth2)OAuth2 audience

retry_config​

FieldTypeRequiredDefaultDescription
max_attemptsintegeryes—Maximum number of retry attempts
initial_delay_msintegeryes—Initial backoff delay (ms)
max_delay_msintegeryes—Maximum backoff delay (ms)
backoff_multipliernumberyes—Exponential backoff multiplier
jitternumberno0De-correlation jitter as a fraction of the delay (0-1); the sleep never exceeds the un-jittered backoff

The configured policy governs the receive retry loop (attempt count, delays, and the delay cap — max_delay_ms defaults to 5s but any value is valid, e.g. a 6s initial delay with a 12s cap); cancellation during a backoff wait interrupts the wait immediately.

tls​

FieldTypeRequiredDefaultDescription
certificate_chain_filestringno—PEM file with the certificate chain the broker certificate is verified against (the trust anchor of a private CA). It is not a client certificate: the driver adds it to its trust store.
hostname_verificationbooleannotrueVerify the broker certificate hostname.

Examples​

input:
type: "pulsar"
service_url: "pulsar://localhost:6650"
topic: "my-namespace/my-topic"
subscription_name: "my-subscription"
input:
type: "pulsar"
service_url: "pulsar://pulsar-cluster:6650"
topic: "persistent://my-tenant/my-ns/events"
subscription_name: "consumer-group-1"
subscription_type: "shared"
input:
type: "pulsar"
service_url: "pulsar+ssl://secure-pulsar:6651"
topic: "secure-topic"
subscription_name: "secure-subscription"
auth:
type: "token"
token: "${PULSAR_TOKEN}"
input:
type: "pulsar"
service_url: "pulsar+ssl://pulsar.cloud:6651"
topic: "cloud-topic"
subscription_name: "oauth-subscription"
auth:
type: "o_auth2"
issuer_url: "https://auth.example.com"
credentials_url: "https://auth.example.com/credentials.json"
audience: "pulsar-cluster"

Notes​

  • No metadata columns are attached today: the Pulsar input forwards decoded payloads without adding __meta_* columns.
  • Subscription types: exclusive (single consumer, ordered), shared (round-robin, unordered), failover (primary/standby, ordered), key_shared (routed by key, ordered within the same key).
  • Error behavior: an ended subscription stream (the consumer returning no more messages) surfaces as Disconnection and the engine reconnects — it does not end the job as if the data had legitimately ended. Receiver closure during shutdown keeps graceful-end semantics.