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.

28 lines
557 B

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