Skip to content

Commit

Permalink
nsqd: if mem-queue-size=0, ephemeral channel still needs mem-queue
Browse files Browse the repository at this point in the history
use unbuffered mem-queue in this case, like nsqd 1.2.0
  • Loading branch information
ploxiln committed Jan 6, 2022
1 parent ead7369 commit 786c1f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nsqd/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func NewChannel(topicName string, channelName string, nsqd *NSQD,
if strings.HasSuffix(channelName, "#ephemeral") {
c.ephemeral = true
c.backend = newDummyBackendQueue()
if c.memoryMsgChan == nil {
// MemQueueSize==0
c.memoryMsgChan = make(chan *Message)
}
} else {
dqLogf := func(level diskqueue.LogLevel, f string, args ...interface{}) {
opts := nsqd.getOpts()
Expand Down

0 comments on commit 786c1f2

Please sign in to comment.