Skip to main content
Version: Next

Pulsar

The Pulsar output publishes messages to an Apache Pulsar topic. It supports token and OAuth2 authentication and uses a single shared producer per output.

Configuration

FieldTypeRequiredDefaultDescription
typestringyesFixed value "pulsar"
service_urlstringyesPulsar service URL (e.g. pulsar://localhost:6650).
topicobjectyesDestination topic (expression; see below).
authobjectnoAuthentication configuration (see below).
value_fieldstringnoRecord field used as the message payload.

topic

topic is an Expr<String> object with one of these shapes:

FieldTypeRequiredDescription
typestringyesvalue (static) or expr (SQL expression).
valuestringyes (value)Static topic name (e.g. persistent://tenant/namespace/topic).
exprstringyes (expr)SQL expression evaluated per message.

auth

auth is a tagged object (selected by its type field). Supported variants: token and oauth2.

token

FieldTypeRequiredDescription
typestringyestoken.
tokenstringyesAuthentication token.

oauth2

FieldTypeRequiredDescription
typestringyesoauth2.
issuer_urlstringyesOAuth2 issuer URL.
credentials_urlstringyesURL to the client credentials file.
audiencestringyesOAuth2 audience.

Examples

Basic Pulsar Producer

output:
type: "pulsar"
service_url: "pulsar://localhost:6650"
topic:
type: "value"
value: "persistent://public/default/my-topic"

With Token Authentication

output:
type: "pulsar"
service_url: "pulsar+ssl://secure-pulsar:6651"
topic:
type: "value"
value: "persistent://public/default/secure-topic"
auth:
type: "token"
token: "${PULSAR_TOKEN}"

With OAuth2 Authentication

output:
type: "pulsar"
service_url: "pulsar+ssl://secure-pulsar:6651"
topic:
type: "value"
value: "persistent://public/default/events"
auth:
type: "oauth2"
issuer_url: "https://auth.example.com/oauth2"
credentials_url: "file:///etc/pulsar/credentials.json"
audience: "urn:pulsar:cluster"

Notes

  • The output validates the service URL and auth fields at build and connect time; misconfiguration fails fast.
  • Pulsar authentication supports token and oauth2 (client credentials). Basic username/password authentication is not supported.