Route Messages to Multiple Topics in Pulsar Functions

Опубликовано: 21 Май 2026
на канале: StreamNative Academy
127
0

Videos in this playlist were created using StreamNative Hosted, a fully-hosted Pulsar cluster option available from StreamNative. Configuration and functionality in other StreamNative Managed products are similar but may differ slightly.

Pulsar Functions on StreamNative Cloud Playlist
   • Pulsar Functions on StreamNative Cloud  

Use method newOutputRecordBuilder() in combination with destinationTopic() to route a message to an alternate topic. Using newOutputRecordBuilder() requires using Pulsar Functions API 2.11 or newer and a function runner (executing the function code on your server) of 2.11 or newer.

If you are unable to upgrade to 2.11, topic routing can also be completed using the older method newOutputMessage() on the context object, but the pattern of using this method is different than newOutputRecordBuilder() (e.g. uses sendAsync()).