Documentation
¶
Index ¶
- Constants
- func AddPartitionKeyFromSubject(watermillIn *message.Message, cloudEvent event.Event) (*message.Message, error)
- func NewPublisher(ctx context.Context, in PublisherOptions) (*kafka.Publisher, error)
- func NewSubscriber(in SubscriberOptions) (message.Subscriber, error)
- type AutoProvisionTopic
- type BrokerOptions
- type LoggerFunc
- type PublisherOptions
- type SaramaLoggerAdaptor
- type SubscriberOptions
Constants ¶
View Source
const (
PartitionKeyMetadataKey = "x-kafka-partition-key"
)
Variables ¶
This section is empty.
Functions ¶
func AddPartitionKeyFromSubject ¶
func AddPartitionKeyFromSubject(watermillIn *message.Message, cloudEvent event.Event) (*message.Message, error)
AddPartitionKeyFromSubject adds partition key to the message based on the CloudEvent subject.
func NewPublisher ¶
func NewSubscriber ¶
func NewSubscriber(in SubscriberOptions) (message.Subscriber, error)
Types ¶
type AutoProvisionTopic ¶
type BrokerOptions ¶
type BrokerOptions struct { KafkaConfig config.KafkaConfiguration ClientID string Logger *slog.Logger MetricMeter otelmetric.Meter MeterPrefix string DebugLogging bool }
func (*BrokerOptions) Validate ¶
func (o *BrokerOptions) Validate() error
type LoggerFunc ¶
type PublisherOptions ¶
type PublisherOptions struct { Broker BrokerOptions ProvisionTopics []AutoProvisionTopic }
func (*PublisherOptions) Validate ¶
func (o *PublisherOptions) Validate() error
type SaramaLoggerAdaptor ¶
type SaramaLoggerAdaptor struct {
// contains filtered or unexported fields
}
func (*SaramaLoggerAdaptor) Print ¶
func (s *SaramaLoggerAdaptor) Print(v ...interface{})
func (*SaramaLoggerAdaptor) Printf ¶
func (s *SaramaLoggerAdaptor) Printf(format string, v ...interface{})
func (*SaramaLoggerAdaptor) Println ¶
func (s *SaramaLoggerAdaptor) Println(v ...interface{})
type SubscriberOptions ¶
type SubscriberOptions struct { Broker BrokerOptions ConsumerGroupName string }
func (*SubscriberOptions) Validate ¶
func (o *SubscriberOptions) Validate() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.