i_producer.go 239 B

123456789
  1. package mq
  2. import "io"
  3. type IProducer interface {
  4. io.Closer
  5. SendJSON(topic string, value interface{}) (interface{}, error) // 发布JSON消息
  6. SendJSONs(messages []*ProducerMessage) error // 批量发布JSON消息
  7. }