Broker guide
Apache Pulsar
Persistent topics with individual settlement on Go, Python, TypeScript, C++ userver and C++ Coro.
When to use
Use when selecting a broker or configuring its Input/Sink endpoints.
Behavior
- Input receives messages into a pipeline; Sink publishes messages from a pipeline. Declaring an endpoint alone does not connect a graph.
- Check the deployed generator capability catalog for the selected language and direction. Updating a plugin alone does not update the backend.
- Creation is explicitly enabled per resource; existing-only is the default. Missing or incompatible resources fail instead of being silently replaced.
- Supply credentials through runtime environment/Vault configuration. Never embed secrets in architecture source, URLs or Help examples. TLS certificate paths require deployed files.
- Request completion (Done) is not a broker ACK. A publication result is not proof of downstream business processing. Unknown send outcomes must not be blindly retried.
- A subscription is durable: stopping the consumer does not unsubscribe or delete it. Initial position applies only to explicit creation.
Connection properties
Connection
PropertyTypeDescription
serversstring[]Exactly one pulsar:// or pulsar+ssl:// binary URL.
adminUrlstringSeparate http(s) administrative URL.
tlsCaFile / tlsCertFile / tlsKeyFilestringCertificate paths; authentication tokens are runtime-only.
Endpoint properties
Endpoint
PropertyTypeDescription
topicstringFully qualified persistent topic.
subscriptionName / subscriptionTypestringInput name and Shared, Exclusive or Failover mode.
createTopic / createSubscriptionbooleanIndependent opt-ins, default false.
partitionsintegerPartition count for explicit topic creation; does not resize existing topics.
subscriptionInitialPositionstringEarliest or Latest for a new subscription only.
receiverQueueSize / negativeAckRedeliveryDelayMsintegerInput buffering and native NACK delay.
publisherMaxInFlightintegerSink admission limit, distinct from receiver buffering.
Python DSL declaration (wire endpoints to Input/Sink separately)
from sa_dsl import Project, Function, LOCAL_MODULE
project = Project("BrokerExample")
broker = project.pulsar_connector("Events", servers=["pulsar://localhost:6650"],
admin_url="http://localhost:8080")
endpoint = broker.endpoint("Receive events", topic="persistent://public/default/orders",
subscription_name="workers", subscription_type="Shared",
create_topic=False, create_subscription=False,
function=Function("ReceiveEvents", module=LOCAL_MODULE))