databus.go 385 B

1234567891011121314151617
  1. package dao
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/library/log"
  6. )
  7. // PubExtraRet pub extra msg into databus.
  8. func (d *Dao) PubExtraRet(c context.Context, mid int64, msg interface{}) (err error) {
  9. key := strconv.FormatInt(mid, 10)
  10. if err = d.dbExtraAnswerRet.Send(c, key, msg); err != nil {
  11. log.Error("d.dbExtraAnswerRet.Send(%s, %v) error (%v)", key, msg, err)
  12. }
  13. return
  14. }