config.go 501 B

123456789101112131415161718192021
  1. package kq
  2. import "zero/core/service"
  3. const (
  4. firstOffset = "first"
  5. lastOffset = "last"
  6. )
  7. type KqConf struct {
  8. service.ServiceConf
  9. Brokers []string
  10. Group string
  11. Topic string
  12. Offset string `json:",options=first|last,default=last"`
  13. NumConns int `json:",default=1"`
  14. NumProducers int `json:",default=8"`
  15. NumConsumers int `json:",default=8"`
  16. MinBytes int `json:",default=10240"` // 10K
  17. MaxBytes int `json:",default=10485760"` // 10M
  18. }