Esempio n. 1
0
func StartServer() {
	for i := 0; i < 10; i++ {
		if _, err := common.NsqConsumerGO(common.MSG_CENTER_TOPIC, "msgcenter-channel", 10, &Handler{}); err != nil {
			panic(err)
		}
	}
	select {}
	syslog.SysLogDeinit()
	return
}
Esempio n. 2
0
func StartServer() {
	handler := &Handler{}

	for i := 0; i < 10; i++ {
		if _, err := common.NsqConsumerGO(common.MSG_SERVER_TOPIC, "msg_server_channel", uint(10), handler); err != nil {
			panic(err)
		}
	}
	select {}
	syslog.SysLogDeinit()
	return
}