Documentation ¶
Overview ¶
Package producer holds interface for publishing messages to required destinations and implementation for sending messages to Kafka.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaProducer ¶
type KafkaProducer struct {
// contains filtered or unexported fields
}
KafkaProducer is a Producer implementation for publishing messages to Kafka
func (*KafkaProducer) Publish ¶
func (p *KafkaProducer) Publish(msg Message) error
Publish publishes message to Kafka
type Message ¶
type Message struct { ID uuid.UUID `json:"id"` Body []byte `json:"body"` Topic string `json:"topic"` }
Message struct contains data for message read from RabbitMQ and ready for sending to Kafka
func NewMessage ¶
NewMessage initializes and instantiates new Message
type Producer ¶
Producer is an interface for publishing messages service
func NewKafkaProducer ¶
NewKafkaProducer instantiates and establishes new Kafka connection
Click to show internal directories.
Click to hide internal directories.