milvus/internal/util/mqclient/rmq_producer.go
Xiangyu Wang 8b62790017 Reorganize mqclient
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>
2021-04-02 10:01:11 +08:00

24 lines
437 B
Go

package mqclient
import (
"context"
"github.com/zilliztech/milvus-distributed/internal/util/rocksmq/client/rocksmq"
)
type rmqProducer struct {
p rocksmq.Producer
}
func (rp *rmqProducer) Topic() string {
return rp.p.Topic()
}
func (rp *rmqProducer) Send(ctx context.Context, message *ProducerMessage) error {
pm := &rocksmq.ProducerMessage{Payload: message.Payload}
return rp.p.Send(pm)
}
func (rp *rmqProducer) Close() {
}