logo_smallAxellero.io

Kafka

Publish messages to Apache Kafka topics in Axellero workflows.

Kafka Node

Publish messages to Apache Kafka topics in Axellero workflows. Currently supports message publishing with SASL authentication.

Available Operations

  • Publish: Send messages to Kafka topics

Current Capabilities

This implementation supports message publishing only. Message consumption and topic management operations are not supported.

Connection Configuration

ParameterTypeRequiredDescription
brokersARRAYYesList of Kafka broker addresses
usernameTEXTNoSASL username for authentication
passwordTEXTNoSASL password for authentication
{
  "brokers": ["kafka1.example.com:9092", "kafka2.example.com:9092"],
  "username": "{{ctx.consts.KAFKA_USERNAME}}",
  "password": "{{ctx.consts.KAFKA_PASSWORD}}"
}

Message Publishing

ParameterTypeRequiredDescription
topicTEXTYesKafka topic name
keyTEXTNoMessage key for partitioning
valueTEXTYesMessage content
{
  "topic": "user-events",
  "key": "{{ctx.user.id}}",
  "value": "{{ctx.nodes.eventProcessor.outputs.eventData}}"
}

Basic Message Publishing

{
  "topic": "notifications",
  "value": "{\"type\": \"email\", \"recipient\": \"{{ctx.user.email}}\", \"message\": \"{{ctx.vars.notificationText}}\"}"
}

Message with Partitioning Key

{
  "topic": "user-activity",
  "key": "{{ctx.user.attrs.orgId}}",
  "value": "{{ctx.nodes.activityLogger.outputs.activityJson}}"
}

Workflow Integration

Use workflow context to construct topic names and message content:

{
  "topic": "{{ctx.workspace_slug}}-events",
  "key": "{{ctx.vars.eventType}}",
  "value": "{{ctx.nodes.eventFormatter.outputs.formattedEvent}}"
}

Response Format

Success Response

{
  "success": true,
  "topic": "user-events",
  "partition": 2,
  "offset": 1247
}

Error Response

{
  "success": false,
  "error": "Failed to publish message to topic"
}

Use Cases

  • Event Logging: Publish workflow events for audit trails
  • Data Export: Send processed data to downstream systems
  • Notification Triggers: Publish notification events to external services
  • Analytics Events: Send user activity data for analytics processing