kafkapub

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

README

tibco-kafkapub

This activity provides your flogo application the ability to send a Kafka message

Installation

flogo install github.com/TIBCOSoftware/flogo-contrib/activity/kafkapub

Schema

Inputs and Outputs:

{
 "inputs":[
    {
      "name": "BrokerUrls",
      "type": "string",
      "required": true
    },
    {
      "name": "Topic",
      "type": "string",
      "required": true
    },
    {
      "name": "Message",
      "type": "string",
      "required": true
    },
    {
      "name": "user",
      "type": "string",
      "required": false
    },
    {
      "name": "password",
      "type": "string",
      "required": false
    },
    {
      "name": "truststore",
      "type": "string",
      "required": false
    }
  ],
  "outputs": [
    {
      "name": "partition",
      "type": "int"
    },
    {
      "name": "offset",
      "type": "long"
    }
  ]
}

Settings

Setting Description Cardinality
BrokerUrls The Kafka cluster to connect to Required
Token The Kafka topic on which to place the message Required
Message The text message to send Required
user If connectiong to a SASL enabled port, the userid to use for authentication Optional
password If connectiong to a SASL enabled port, the password to use for authentication Optional
truststore If connectiong to a TLS secured port, the directory containing the certificates representing the trust chain for the connection. This is usually just the CACert used to sign the server's certificate Optional

Outputs

Value Description
partition Documents the partition that the message was placed on
offset Documents the offset for the message

Configuration Examples

Simple

Configure a task to send a message to the 'syslog' topic.

{
      "id": 2,
      "name": "tibco-kafkapub",
      "description": "Publish a message to a kafka topic",
      "type": 1,
      "activityType": "tibco-kafkapub",
      "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/kafkapub",
      "attributes": [
        {
          "name": "BrokerUrls",
          "value": "bilbo:9092",
          "required": true,
          "type": "string"
        },
        {
          "name": "Topic",
          "value": "syslog",
          "required": true,
          "type": "string"
        },
        {
          "name": "Message",
          "value": "mary had a little lamb",
          "required": true,
          "type": "string"
        }
      ]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new activity

Types

type KafkaParms

type KafkaParms struct {
	// contains filtered or unexported fields
}

type KafkaPubActivity

type KafkaPubActivity struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MyActivity is a stub for your Activity implementation

func (*KafkaPubActivity) Eval

func (a *KafkaPubActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*KafkaPubActivity) Metadata

func (a *KafkaPubActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL