2018-08-13 16:20:49 +08:00
|
|
|
package kafka
|
|
|
|
|
|
|
|
import (
|
2018-08-13 16:22:32 +08:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/glog"
|
2018-08-13 16:20:49 +08:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/msgqueue"
|
|
|
|
"github.com/golang/protobuf/proto"
|
2018-08-20 06:17:55 +08:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
2018-08-13 16:20:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
msgqueue.MessageQueues = append(msgqueue.MessageQueues, &LogQueue{})
|
|
|
|
}
|
|
|
|
|
|
|
|
type LogQueue struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *LogQueue) GetName() string {
|
|
|
|
return "log"
|
|
|
|
}
|
|
|
|
|
2018-08-20 06:17:55 +08:00
|
|
|
func (k *LogQueue) Initialize(configuration util.Configuration) (err error) {
|
2018-08-13 16:20:49 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
|
|
|
|
|
|
|
|
glog.V(0).Infof("%v: %+v", key, message)
|
|
|
|
return nil
|
|
|
|
}
|