package main import ( "sync" "github.com/iron-io/iron_mq_go" ) var wg sync.WaitGroup func main() { token := "" projectId := "" cloud := ironmq.IronAWSUSEast c := ironmq.NewClient(projectId, token, cloud) q := c.Queue("go-test-queue") for i := 0; i < 200; i++ { wg.Add(1) go sendMsgs(q) } wg.Wait() } func sendMsgs(q *ironmq.Queue) { for i := 0; i < 100; i++ { _, err := q.Push("Go msg") if err != nil { panic(err.Error()) } } wg.Done() }