Versions in this module Expand all Collapse all v1 v1.0.0 May 31, 2023 Changes in this version + type Config struct + Brokers []string + ClientIDPrefix string + type Kafka struct + Config Config + SaramaCfg *sarama.Config + func NewKafka(cfg Config) *Kafka + func (k *Kafka) OpenSubscription(group string, topics ...string) (*Subscription, error) + func (k *Kafka) OpenTopic(topicName string) (*Topic, error) + type MessageHeader struct + ID string + Producer string + Source string + Topic string + func (m MessageHeader) CreatedAt() time.Time + func (m MessageHeader) Xid() xid.ID + type ReceivedMessage struct + type Subscription struct + PubsubSubscription *pubsub.Subscription + func (t *Subscription) Close() error + func (t *Subscription) ReceiveJSON(ctx context.Context, dest interface{}) (*ReceivedMessage, error) + func (t *Subscription) ReceiveProtobuf(ctx context.Context, dest proto.Message) (*ReceivedMessage, error) + type Topic struct + PubsubTopic *pubsub.Topic + Topic string + func (t *Topic) Close() error + func (t *Topic) SendJSON(ctx context.Context, v interface{}) (*MessageHeader, error) + func (t *Topic) SendProtobuf(ctx context.Context, v proto.Message) (*MessageHeader, error)