* feat(tracker): update message schema with BatchMetadata; separate message-related responsibilities; add message size * chore(docker): removing edge busybox, as the main repo updated * feat(backend): updated message protocol templates * feat(backend): added support of message size * feat(backend): implemented iterator for new message protocol (with message size) Co-authored-by: Alex Kaminskii <alex@openreplay.com>
12 lines
428 B
Go
12 lines
428 B
Go
package queue
|
|
|
|
import (
|
|
"openreplay/backend/pkg/messages"
|
|
"openreplay/backend/pkg/queue/types"
|
|
)
|
|
|
|
func NewMessageConsumer(group string, topics []string, handler types.RawMessageHandler, autoCommit bool, messageSizeLimit int) types.Consumer {
|
|
return NewConsumer(group, topics, func(sessionID uint64, value []byte, meta *types.Meta) {
|
|
handler(sessionID, messages.NewIterator(value), meta)
|
|
}, autoCommit, messageSizeLimit)
|
|
}
|