package
0.74.0
Repository: https://github.com/beatlabs/patron.git
Documentation: pkg.go.dev

# Functions

DefaultConsumerSaramaConfig function creates a Sarama configuration with a client ID derived from host name and consumer name.
New initializes a new kafka consumer component with support for functional configuration.
NewBatch initializes a new batch of messages returning an instance of the implementation of the kafka Batch interface.
NewMessage initializes a new message which is an implementation of the kafka Message interface.
WithBatchMessageDeduplication enables the deduplication of messages based on the message's key.
WithBatchSize sets the message batch size the component should process at once.
WithBatchTimeout sets the message batch timeout.
WithCheckTopic checks whether the component-configured topics exist in the broker.
WithCommitSync instructs the consumer to commit offsets in a blocking operation after processing every batch of messages.
WithFailureStrategy sets the strategy to follow for the component when it encounters an error.
WithNewSessionCallback adds a callback when a new consumer group session is created (e.g., rebalancing).
WithRetries sets the number of time a component should retry in case of an error.
WithRetryWait sets the wait period for the component retry.

# Constants

ExitStrategy does not commit failed message offsets and exits the application.
SkipStrategy commits the offset of messages that failed processing, and continues processing.

# Structs

Component is a kafka consumer implementation that processes messages in batch.

# Interfaces

Batch interface for multiple AWS SQS messages.
Message interface for wrapping messages that are handled by the kafka component.

# Type aliases

BatchProcessorFunc definition of a batch async processor function.
FailStrategy type definition.
OptionFunc definition for configuring the component in a functional way.