Documentation
¶
Overview ¶
Package pkafka provides a kafka producer that tries really hard never to lose messages. It'll retry messages that fail to send, and will buffer messages to disk, so we're sure we're not loosing them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKafkaDown is returned when kafka is down. ErrKafkaDown = fmt.Errorf("kafka is down") )
Functions ¶
This section is empty.
Types ¶
type AbstractStorage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new kafka client. It will apply the options you pass to it. kgo.TransactionalID is set to "perbu" by default to make the transactions work. See kgo.NewClient for more info on the options. It will ping kafka to make sure it's up and running and fail if it's not.
func (*Client) GetMsgCount ¶
type PersistedMessage ¶
PersistedMessage is the struct that is persisted to storage. It can be used to reconstruct the original kgo.Record, but suited for storage.
Click to show internal directories.
Click to hide internal directories.