Documentation
¶
Overview ¶
Package kafka publishes outbox events to Apache Kafka using IBM/sarama.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSaramaConfig ¶ added in v0.1.0
NewSaramaConfig returns a durable producer config: acks=all, idempotent, ordered retries and hash partitioning by Event.Key.
Types ¶
type Config ¶
type Config struct {
Brokers []string
// DefaultTopic is used when Event.Topic is empty.
DefaultTopic string
// Sarama overrides the producer config. Nil uses NewSaramaConfig().
// Producer.Return.Successes is always forced to true.
Sarama *sarama.Config
}
Config configures the publisher.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher implements xoutbox.BatchPublisher.
func NewFromProducer ¶ added in v0.1.0
func NewFromProducer(p sarama.SyncProducer, defaultTopic string) *Publisher
NewFromProducer wraps an existing SyncProducer.
Click to show internal directories.
Click to hide internal directories.