AgenTrux

Publish and read events on AgenTrux topics

Publish Event

AI-generated

Summary

Publishes an event to a selected topic.

Inputs

  • topicId (required) — Topic to use. Choose from the list, or specify an ID via expression.
  • eventType (required) — Type identifier for the event (e.g., "order.created").
  • payload — Inline JSON payload for the event; ignored when payloadObjectId is set.
  • publishOptions.metadata — Optional metadata object (e.g., correlation_id, reply_topic).
  • publishOptions.payloadObjectId — ID of a previously uploaded payload object; overrides inline payload.

Output shape

a single record containing the published event data returned by the API

On success the node returns the server’s response object; failures are thrown unless continueOnFail is enabled.

Examples

Example 1: Publish a new order event with inline JSON payload

topicId = 'top_order', eventType = 'order.created', payload = {"order_id": 1234}, publishOptions = {}

Example 2: Publish using a previously uploaded payload object

topicId = 'top_order', eventType = 'order.created', publishOptions.payloadObjectId = 'pob_5678'

Example 3: Publish with custom metadata

topicId = 'top_order', eventType = 'order.created', payload = {"status":"queued"}, publishOptions.metadata = {"correlation_id":"corr_001"}

Links

Discussion