Skip to main content
Version: 0.6.x
output/pulsarINPUTBUFFERPROCESSOROUTPUT

Pulsar

The Pulsar output publishes messages to an Apache Pulsar topic. It supports token and OAuth2 authentication and builds one producer per destination topic (reused across writes). Writes are reliable: each message is confirmed by a broker receipt before the write returns, and a lost broker surfaces as a bounded error rather than a hang or a fire-and-forget success.

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Fixed value "pulsar"
service_urlstringyes—Pulsar service URL (e.g. pulsar://localhost:6650).
topicobjectyes—Destination topic (expression; see below).
authobjectno—Authentication configuration (see below).
value_fieldstringno—Record field used as the message payload (binary or string column; takes precedence over codec when set).

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.

An expression must yield a non-null string for every row: a NULL result for any row fails the batch with the expression and the row named (wrap it in COALESCE(expr, 'fallback') or filter such rows upstream).

auth​

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

token​

FieldTypeRequiredDescription
typestringyestoken.
tokenstringyesAuthentication token.

o_auth2​

FieldTypeRequiredDescription
typestringyeso_auth2.
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: "o_auth2"
issuer_url: "https://auth.example.com/oauth2"
credentials_url: "https://auth.example.com/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 o_auth2 (client credentials). Basic username/password authentication is not supported.