mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
bug fixup, configurable natsmq, add unittest, pass e2e. move natsmq to pkg project Signed-off-by: chyezh <ye.zhen@zilliz.com> Co-authored-by: yiwangdr <yiwangdr@gmail.com>
25 lines
773 B
Go
25 lines
773 B
Go
package msgstream
|
|
|
|
import (
|
|
"github.com/milvus-io/milvus/internal/mq/mqimpl/rocksmq/server"
|
|
"github.com/milvus-io/milvus/internal/mq/msgstream/mqwrapper/rmq"
|
|
"github.com/milvus-io/milvus/pkg/log"
|
|
"github.com/milvus-io/milvus/pkg/mq/msgstream"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
// NewRocksmqFactory creates a new message stream factory based on rocksmq.
|
|
func NewRocksmqFactory(path string) msgstream.Factory {
|
|
if err := server.InitRocksMQ(path); err != nil {
|
|
log.Fatal("fail to init rocksmq", zap.Error(err))
|
|
}
|
|
log.Info("init rocksmq msgstream success", zap.String("path", path))
|
|
|
|
return &msgstream.CommonFactory{
|
|
Newer: rmq.NewClientWithDefaultOptions,
|
|
DispatcherFactory: msgstream.ProtoUDFactory{},
|
|
ReceiveBufSize: 1024,
|
|
MQBufSize: 1024,
|
|
}
|
|
}
|