partitioncsm

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2017 License: Apache-2.0 Imports: 14 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
}

T 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(parentActDesc *actor.Descriptor, group, topic string, partition int32, cfg *config.Proxy,
	groupMember *subscriber.T, msgFetcherF msgfetcher.Factory, offsetMgrF offsetmgr.Factory,
) *T

Spawn creates a partition consumer instance and starts its goroutines.

func (*T) IsSafe2Stop added in v0.14.0

func (pc *T) IsSafe2Stop() bool

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()

implements `multiplexer.In`

Jump to

Keyboard shortcuts

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