mirror of https://github.com/milvus-io/milvus.git
parent
85c1404393
commit
af3736aff6
|
@ -103,6 +103,9 @@ func (ms *RmqMsgStream) AsProducer(channels []string) {
|
||||||
err := rocksmq.Rmq.CreateChannel(channel)
|
err := rocksmq.Rmq.CreateChannel(channel)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
ms.producers = append(ms.producers, channel)
|
ms.producers = append(ms.producers, channel)
|
||||||
|
} else {
|
||||||
|
errMsg := "Failed to create producer " + channel + ", error = " + err.Error()
|
||||||
|
panic(errMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ func (rmq *RocksMQ) CreateChannel(channelName string) error {
|
||||||
|
|
||||||
// Check if channel exist
|
// Check if channel exist
|
||||||
if rmq.checkKeyExist(beginKey) || rmq.checkKeyExist(endKey) {
|
if rmq.checkKeyExist(beginKey) || rmq.checkKeyExist(endKey) {
|
||||||
return errors.New("Channel " + channelName + " already exists.")
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
err := rmq.kv.Save(beginKey, "0")
|
err := rmq.kv.Save(beginKey, "0")
|
||||||
|
|
Loading…
Reference in New Issue