You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
597 B

6 years ago
6 years ago
  1. package kafka
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/glog"
  4. "github.com/chrislusf/seaweedfs/weed/msgqueue"
  5. "github.com/chrislusf/seaweedfs/weed/util"
  6. "github.com/golang/protobuf/proto"
  7. )
  8. func init() {
  9. msgqueue.MessageQueues = append(msgqueue.MessageQueues, &LogQueue{})
  10. }
  11. type LogQueue struct {
  12. }
  13. func (k *LogQueue) GetName() string {
  14. return "log"
  15. }
  16. func (k *LogQueue) Initialize(configuration util.Configuration) (err error) {
  17. return nil
  18. }
  19. func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
  20. glog.V(0).Infof("%v: %+v", key, message)
  21. return nil
  22. }