2018-08-13 08:20:49 +00:00
|
|
|
package kafka
|
|
|
|
|
|
|
|
import (
|
2018-08-19 22:18:37 +00:00
|
|
|
"github.com/golang/protobuf/proto"
|
2022-07-29 07:17:28 +00:00
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/notification"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
2018-08-13 08:20:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2018-09-16 08:18:30 +00:00
|
|
|
notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
|
2018-08-13 08:20:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type LogQueue struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *LogQueue) GetName() string {
|
|
|
|
return "log"
|
|
|
|
}
|
|
|
|
|
2020-01-29 17:09:55 +00:00
|
|
|
func (k *LogQueue) Initialize(configuration util.Configuration, prefix string) (err error) {
|
2018-08-13 08:20:49 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
|
|
|
|
|
|
|
|
glog.V(0).Infof("%v: %+v", key, message)
|
|
|
|
return nil
|
|
|
|
}
|