Skip to main content
Version: Next

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.

Configuration

FieldTypeRequiredDefaultDescription
typestringyesConstant value "pulsar"
service_urlstringyesPulsar service URL, e.g. pulsar://host:6650 or pulsar+ssl://host:6651; cluster URLs separated by commas
topicstringyesTopic, e.g. persistent://tenant/namespace/topic or a short name
subscription_namestringyesSubscription name
subscription_typestringno"exclusive"Subscription type: exclusive / shared / failover / key_shared
authobjectnoAuthentication configuration, see table below (tagged enum)
retry_configobjectnoRetry configuration, see table below

auth

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

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

retry_config

FieldTypeRequiredDefaultDescription
max_attemptsintegeryesMaximum number of retry attempts
initial_delay_msintegeryesInitial backoff delay (ms)
max_delay_msintegeryesMaximum backoff delay (ms)
backoff_multipliernumberyesExponential 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: "oauth2"
issuer_url: "https://auth.example.com"
credentials_url: "file:///path/to/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).