19 lines
273 B
Go
19 lines
273 B
Go
package utils
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/nsqio/go-nsq"
|
|
)
|
|
|
|
func GetProducer() *nsq.Producer {
|
|
config := nsq.NewConfig()
|
|
|
|
producer, err := nsq.NewProducer("ekb-app01.myway.local:4150", config)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
return producer
|
|
}
|
|
|
|
func GetConsumer() |