Exemplo n.º 1
0
func newTestConsumer(topic, channel string, f func(*nsq.Message) error) {
	testConsumers = append(testConsumers, cafe.NewConsumer(topic, channel, f))
}
Exemplo n.º 2
0
func Init() {
	consumer := cafe.NewConsumer(cafe.FoodPreparedTopic, cafe.FoodPreparedTopic+"ChefTodoList", FoodPreparedHandler)
	consumers = append(consumers, consumer)
	consumer = cafe.NewConsumer(cafe.FoodOrderedTopic, cafe.FoodOrderedTopic+"ChefTodoList", FoodOrderedHandler)
	consumers = append(consumers, consumer)
}