func NewSimpleQueue(ctx context.Context, control config.Control, receiver QueueReceiver, outch chan []byte, queueSize int, retryInterval uint) Queue {
	var chanSize int
	if queueSize < 1 {
		chanSize = 1
	} else {
		chanSize = queueSize
	}
	s := &simpleQueue{
		RetryInterval: retryInterval,
		MaxQueueSize:  queueSize,
		ctx:           ctx,
		output:        receiver,
		control:       control,
		isInPause:     StatusDelivering,
		queue:         make(chan interface{}, chanSize),
		codecCh:       outch,
	}
	go s.backgroundtask()
	return s
}
// NewSimpleQueue returns a new queue using a simple retry/queuing mechanism. receiver is your Output object. queueSize is the number of events that will be queued before dropping events from the queue; with a value of -1 the sky is the limit. retryInterval is the time in seconds between each retry.
NewSimpleQueue returns a new queue using a simple retry/queuing mechanism. receiver is your Output object. queueSize is the number of events that will be queued before dropping events from the queue; with a value of -1 the sky is the limit. retryInterval is the time in seconds between each retry.
// NewSimpleQueue returns a new queue using a simple retry / queuing mechanism . receiver is your Output object . queueSize is the number of events that will be queued before dropping events from the queue ; with a value of - 1 the sky is the limit . retryInterval is the time in seconds between each retry .
func NewSimpleQueue(ctx context.Context, control config.Control, receiver QueueReceiver, outch chan []byte, queueSize int, retryInterval uint) Queue {
	var chanSize int
	if queueSize < 1 {
		chanSize = 1
	} else {
		chanSize = queueSize
	}
	s := &simpleQueue{
		RetryInterval: retryInterval,
		MaxQueueSize:  queueSize,
		ctx:           ctx,
		output:        receiver,
		control:       control,
		isInPause:     StatusDelivering,
		queue:         make(chan interface{}, chanSize),
		codecCh:       outch,
	}
	go s.backgroundtask()
	return s
}
func NewSimpleQueue ( ctx context . Context , control config . Control , receiver QueueReceiver , outch chan [ ] byte , queueSize int , retryInterval uint ) Queue { var chanSize int if queueSize < 1 { chanSize = 1 } else { chanSize = queueSize } s := & simpleQueue { RetryInterval : retryInterval , MaxQueueSize : queueSize , ctx : ctx , output : receiver , control : control , isInPause : StatusDelivering , queue : make ( chan interface { } , chanSize ) , codecCh : outch , } go s . backgroundtask ( ) return s }
NewSimpleQueue returns a new queue using a simple retry/queuing mechanism.
NewSimpleQueue returns a new queue using a simple retry / queuing mechanism .