func (c *codecOutput) background() {
	for {
		select {
		case <-c.ctx.Done():
			return
		case msg := <-c.ch:
			id := atomic.AddUint32(&c.numReceived, 1)
			var failed bool
			for x := range c.FailMsgId {
				if c.FailMsgId[x] == id {
					failed = true
					break
				}
			}
			if failed {
				err := c.queue.Queue(c.ctx, msg)
				if err != nil {
					panic(err)
				}
				atomic.AddUint32(&c.numQueued, 1)
			} else {
				atomic.AddUint32(&c.numSuccess, 1)
			}
		}
	}
}
// background runs in the background, counting number of successfully received messages
background runs in the background, counting number of successfully received messages
// background runs in the background counting number of successfully received messages
func (c *codecOutput) background() {
	for {
		select {
		case <-c.ctx.Done():
			return
		case msg := <-c.ch:
			id := atomic.AddUint32(&c.numReceived, 1)
			var failed bool
			for x := range c.FailMsgId {
				if c.FailMsgId[x] == id {
					failed = true
					break
				}
			}
			if failed {
				err := c.queue.Queue(c.ctx, msg)
				if err != nil {
					panic(err)
				}
				atomic.AddUint32(&c.numQueued, 1)
			} else {
				atomic.AddUint32(&c.numSuccess, 1)
			}
		}
	}
}
func ( c * codecOutput ) background ( ) { for { select { case <- c . ctx . Done ( ) : return case msg := <- c . ch : id := atomic . AddUint32 ( & c . numReceived , 1 ) var failed bool for x := range c . FailMsgId { if c . FailMsgId [ x ] == id { failed = true break } } if failed { err := c . queue . Queue ( c . ctx , msg ) if err != nil { panic ( err ) } atomic . AddUint32 ( & c . numQueued , 1 ) } else { atomic . AddUint32 ( & c . numSuccess , 1 ) } } } }
background runs in the background, counting number of successfully received messages
background runs in the background counting number of successfully received messages