Apache Pulsar Publisher
AI-generatedOverview
This node publishes messages to an Apache Pulsar topic. It is useful for sending real-time data streams, event notifications, or any message-based communication to Pulsar topics. For example, it can be used to send sensor data to a topic for processing or to publish user activity events for analytics.
Use Case Examples
- Publishing a JSON string message to a specific Pulsar topic for downstream processing.
- Sending delayed messages with specific delivery times to coordinate event handling.
- Using message keys and ordering keys to ensure message order in KeyShared subscriptions.
Properties
| Name | Meaning |
|---|---|
| Topic | The Pulsar topic to which the message will be published. |
| Message | The string message content to publish to the topic. |
| Message Options | Additional options for the message such as delivery time, delay, event time, keys, properties, replication clusters, and sequence ID. |
| Producer Options | Options related to the producer such as producer name, timeout, and custom producer properties. |
Output
JSON
messageId- The identifier of the published message returned by Pulsar.
Dependencies
- Requires an Apache Pulsar server connection with appropriate credentials including authentication tokens or API keys.
Troubleshooting
- Common issues include authentication failures due to incorrect or missing credentials, which result in errors when publishing messages.
- Timeout errors may occur if the Pulsar server is unreachable or slow to respond; increasing the timeout setting may help.
- Invalid topic names or message formats can cause publishing failures; ensure the topic string is correctly formatted and the message is a valid string.
Links
- Apache Pulsar Node.js Client Documentation - Official documentation for using Apache Pulsar with Node.js clients, relevant for understanding message publishing options.