2021-04-02 10:01:11 +08:00
|
|
|
package mqclient
|
2021-03-26 20:10:11 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/rocksmq/client/rocksmq"
|
|
|
|
)
|
|
|
|
|
|
|
|
type rmqConsumer struct {
|
|
|
|
c rocksmq.Consumer
|
2021-04-02 10:01:11 +08:00
|
|
|
msgChannel chan ConsumerMessage
|
2021-03-26 20:10:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (rc *rmqConsumer) Subscription() string {
|
|
|
|
return rc.c.Subscription()
|
|
|
|
}
|
|
|
|
|
2021-04-02 10:01:11 +08:00
|
|
|
func (rc *rmqConsumer) Chan() <-chan ConsumerMessage {
|
2021-03-26 20:10:11 +08:00
|
|
|
return rc.msgChannel
|
|
|
|
}
|
|
|
|
|
2021-04-02 10:01:11 +08:00
|
|
|
func (rc *rmqConsumer) Seek(id MessageID) error {
|
2021-03-30 13:53:49 +08:00
|
|
|
msgID := id.(*rmqID).messageID
|
2021-03-26 20:10:11 +08:00
|
|
|
return rc.c.Seek(msgID)
|
|
|
|
}
|
|
|
|
|
2021-04-02 10:01:11 +08:00
|
|
|
func (rc *rmqConsumer) Ack(message ConsumerMessage) {
|
2021-03-26 20:10:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (rc *rmqConsumer) Close() {
|
|
|
|
}
|