func read(queue *redismq.BufferedQueue, prefix string) { consumer, err := queue.AddConsumer("testconsumer" + prefix) if err != nil { panic(err) } consumer.ResetWorking() for { p, err := consumer.MultiGet(100) if err != nil { log.Println(err) continue } p[len(p)-1].MultiAck() } }
func write(queue *redismq.BufferedQueue) { payload := randomString(1024 * 1) //adjust for size for { queue.Put(payload) } }