File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ func (coordinator *Coordinator) NewProducer(
43
43
parameters * ProducerOptions ) (* Producer , error ) {
44
44
coordinator .mutex .Lock ()
45
45
defer coordinator .mutex .Unlock ()
46
- //// size := 1
47
- // if parameters != nil {
48
- // size = parameters.QueueSize
49
- // }
46
+ size := 1
47
+ if parameters != nil {
48
+ size = parameters .QueueSize
49
+ }
50
50
51
51
var lastId , err = coordinator .getNextProducerItem ()
52
52
if err != nil {
@@ -57,7 +57,7 @@ func (coordinator *Coordinator) NewProducer(
57
57
mutex : & sync.Mutex {},
58
58
unConfirmedMessages : map [int64 ]* ConfirmationStatus {},
59
59
status : open ,
60
- messageSequenceCh : make (chan messageSequence , 0 ),
60
+ messageSequenceCh : make (chan messageSequence , size ),
61
61
pendingMessages : pendingMessagesSequence {
62
62
messages : make ([]messageSequence , 0 ),
63
63
size : initBufferPublishSize ,
You can’t perform that action at this time.
0 commit comments