package bus

import (
	"scnict/conf"

	"infish.cn/comm"
)

var NatsCenter *comm.NatsBus

func NewNatsBus(app *conf.AppConf) *comm.NatsBus {

	bus, _ := comm.NewNatsBus2(app.Nats.Url, app.Nats.MaxReconnect,
		app.Nats.ReconnDelaySecond,
		[]*comm.NatsStreamWather{
			// CreateTileConvResultWather(app),
			// CreateMattingResultWather(app),
		},
		[]*comm.NatsMsgReplyer{})
	NatsCenter = bus
	return NatsCenter
}
