Skip to main content
Version: 0.6.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

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

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​

  • Metadata: __meta_topic, __meta_message_id, __meta_publish_time, __meta_ingest_time.
  • Subscription types: exclusive (single consumer, ordered), shared (round-robin, unordered), failover (primary/standby, ordered), key_shared (routed by key, ordered within the same key).