package
0.0.0-20200821104852-f76c6d292a95
Repository: https://github.com/jvanderl/flogo-components.git
Documentation: pkg.go.dev

# README

Kafka Topic Subscriber

This trigger provides your flogo application the ability to start a flow via Kafka

Installation

flogo install github.com/jvanderl/flogo-components/trigger/kafka

Link for flogo web:

https://github.com/jvanderl/flogo-components/trigger/kafka

Schema

Settings, Outputs and Endpoint:

{
  "settings":[
    {
      "name": "server",
      "type": "string"
    },
    {
      "name": "configid",
      "type": "string"
    }
  ],
  "output": [
    {
      "name": "message",
      "type": "string"
    }
  ],
  "handler": {
    "settings": [
      {
        "name": "topic",
        "type": "string"
      },
      {
        "name": "partition",
        "type": "int"
      }
    ]
  }
}

Settings

SettingDescription
serverthe Kafka server(s) [hostname]:[port]
configidThe Kafka client configuration ID

Ouputs

OutputDescription
messageThe message payload

Handlers

SettingDescription
topicThe trigger will subscribe to this topic.
partitionPartition to use for the subscription

Example Configurations

Triggers are configured via the triggers.json of your application. The following are some example configuration of the Kafka Trigger.

Start a flow

Configure the Trigger to start "myflow". So in this case the "handlers" "settings" "topic" is "flogo" will start "testFlow" flow when a message arrives on a topic staring with "flogo" in this case.

{
  "name": "kafka",
  "settings": {
    "server": "127.0.0.1:9092",
    "configid": "test-flogo-trigger"
  },
  "handlers": [
		{
      "actionId": "local://testFlow",
      "settings": {
        "topic": "flogo",
				"partition": "0"
      }
    }
  ]
}

# Functions

NewFactory create a new Trigger factory.
No description provided by the author

# Structs

StartRequest describes a request for starting a ProcessInstance.