partitioncsm

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TESTING ONLY!: If this channel is not `nil` then partition consumers
	// will use it to notify when they fetch the very first message.
	FirstMessageFetchedCh chan *T
)

Functions

This section is empty.

Types

type T

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

exclusiveConsumer ensures exclusive consumption of messages from a topic partition within a particular group. It ensures that a partition is consumed exclusively by first claiming the partition in ZooKeeper. When a fetched message is pulled from the `messages()` channel, it is considered to be consumed and its offset is committed.

func Spawn

func Spawn(namespace *actor.ID, group, topic string, partition int32, cfg *config.T,
	groupMember *groupmember.T, msgStreamFactory msgstream.Factory, offsetMgrFactory offsetmgr.Factory,
) *T

Spawn creates a partition consumer instance and starts its goroutines.

func (*T) Acks

func (pc *T) Acks() chan<- *consumer.Message

implements `multiplexer.In`

func (*T) Messages

func (pc *T) Messages() <-chan *consumer.Message

implements `multiplexer.In`

func (*T) Partition

func (pc *T) Partition() int32

Topic returns the partition ID this partition consumer is responsible for.

func (*T) Stop

func (pc *T) Stop()

Jump to

Keyboard shortcuts

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