kafka

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer added in v0.4.2

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

Consumer definition of a Kafka consumer.

func New

func New(name, clientID, ct, topic string, brokers []string, buffer int, start Offset) (*Consumer, error)

New creates a ew Kafka consumer.

func (*Consumer) Close added in v0.4.2

func (c *Consumer) Close() error

Close handles closing channel and connection of AMQP.

func (*Consumer) Consume added in v0.4.2

func (c *Consumer) Consume(ctx context.Context) (<-chan async.Message, <-chan error, error)

Consume starts consuming messages from a Kafka topic.

type Offset added in v0.4.2

type Offset int64

Offset defines the offset of messages inside a topic.

const (
	// OffsetNewest starts consuming from the newest available message in the topic.
	OffsetNewest Offset = -1
	// OffsetOldest starts consuming from the oldest available message in the topic.
	OffsetOldest Offset = -2
)

Jump to

Keyboard shortcuts

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