mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
8b62790017
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>
24 lines
437 B
Go
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() {
|
|
}
|