test-stream.go 305 B

12345678910111213141516171819
  1. package bus
  2. import (
  3. "fmt"
  4. "github.com/nats-io/nats.go"
  5. "infish.cn/comm"
  6. )
  7. func NewTestStream() *comm.NatsStreamWather {
  8. return &comm.NatsStreamWather{
  9. Stream: "pay-stream",
  10. Topic: "pay.succ",
  11. Queue: "pay-succ-queue",
  12. Cb2: func(msg *nats.Msg) {
  13. fmt.Println("pay stream xxx")
  14. },
  15. }
  16. }