consumer

package
v0.10.3-0...-8c9dab5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerOptions

type ConsumerOptions struct {
	// PChannel is the pchannel of the consumer.
	PChannel string

	// VChannel is the vchannel of the consumer.
	VChannel string

	// DeliverPolicy is the deliver policy of the consumer.
	DeliverPolicy options.DeliverPolicy

	// DeliverFilters is the deliver filters of the consumer.
	DeliverFilters []options.DeliverFilter

	// Handler is the message handler used to handle message after recv from consumer.
	MessageHandler message.Handler
}

ConsumerOptions is the options for creating a consumer.

type ResumableConsumer

type ResumableConsumer interface {
	// Done returns a channel which will be closed when scanner is finished or closed.
	Done() <-chan struct{}

	// Error returns the error of the Consumer.
	Error() error

	// Close the scanner, release the underlying resources.
	Close()
}

ResumableConsumer is the interface for consuming message to log service. ResumableConsumer select a right log node to consume automatically. ResumableConsumer will do automatic resume from stream broken and log node re-balance. All error in these package should be marked by streamingservice/errs package.

func NewResumableConsumer

func NewResumableConsumer(factory factory, opts *ConsumerOptions) ResumableConsumer

NewResumableConsumer creates a new resumable consumer.

Jump to

Keyboard shortcuts

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