Documentation ¶
Overview ¶
Package mq common package for any MQ system Based on Kafka Stream but everything what you need is -
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrManualCommit = errors.New("manual commit") ErrBadMessage = errors.New("bad message") )
Functions ¶
func StartSpanFromConsumer ¶
func StartSpanFromConsumer(_ctx context.Context, span string, e *Message) (trace.Span, context.Context)
StartSpanFromConsumer extract span from kafka's header and continue chain receiver not reference because we put new fields into logger and we expect root ctx for that returns ctx
Types ¶
type CallBack ¶
CallBack will call during HandleMessage it supposed that here will be message handled for calculate execution time at least
type KHeader ¶
type KHeader interface { propagation.TextMapCarrier GetTraceValue() []byte }
type Message ¶
type MiddleWare ¶
MiddleWare ...
func NewConsumerMw ¶
func NewConsumerMw(m metrics.Reader) MiddleWare
NewConsumerMw which provide MW helper for: recovery, debug logging, tracing solution, common metrics and ruration
Click to show internal directories.
Click to hide internal directories.