stream

package
v0.0.0-...-f50f273 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

type Kafka struct {
	Workers  int           `json:"workers"`
	Topic    string        `json:"topic"`
	Brokers  []string      `json:"brokers"`
	GroupID  string        `json:"group_id"`
	MinBytes int           `json:"min_bytes"`
	MaxBytes int           `json:"max_bytes"`
	MaxWait  time.Duration `json:"max_wait"`
	// contains filtered or unexported fields
}

Kafka implements fusion stream using the Kafka system as the backend with support for consumer groups. This implementation uses manual commit based on the Ack function to ensure at-least once delivery. Downstream consumers must take care of idempotency.

func (Kafka) Out

func (ks Kafka) Out(ctx context.Context) (<-chan fusion.Msg, error)

Out validates the Kafka config, creates a kafka consumer connection to the cluster and returns a fusion message channel where it streams the messages from Kafka.

Jump to

Keyboard shortcuts

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