[Fixup] remove nats from default (#26791)

Signed-off-by: chyezh <ye.zhen@zilliz.com>
pull/26725/head
chyezh 2023-09-04 10:01:04 +08:00 committed by GitHub
parent 7624c2b949
commit 0530fd80c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -88,7 +88,7 @@ minio:
# Milvus supports four MQ: rocksmq(based on RockDB), natsmq(embedded nats-server), Pulsar and Kafka.
# You can change your mq by setting mq.type field.
# If you don't set mq.type field as default, there is a note about enabling priority if we config multiple mq in this file.
# 1. standalone(local) mode: rocksmq(default) > natsmq > Pulsar > Kafka
# 1. standalone(local) mode: rocksmq(default) > Pulsar > Kafka
# 2. cluster mode: Pulsar(default) > Kafka (rocksmq and natsmq is unsupported in cluster mode)
mq:
# Default value: "default"

View File

@ -111,9 +111,6 @@ func mustSelectMQType(standalone bool, mqType string, enable mqEnable) string {
if enable.Rocksmq {
return mqTypeRocksmq
}
if enable.Natsmq {
return mqTypeNatsmq
}
}
if enable.Pulsar {
return mqTypePulsar

View File

@ -15,7 +15,7 @@ func TestValidateMQType(t *testing.T) {
func TestSelectMQType(t *testing.T) {
assert.Equal(t, mustSelectMQType(true, mqTypeDefault, mqEnable{true, true, true, true}), mqTypeRocksmq)
assert.Equal(t, mustSelectMQType(true, mqTypeDefault, mqEnable{false, true, true, true}), mqTypeNatsmq)
assert.Equal(t, mustSelectMQType(true, mqTypeDefault, mqEnable{false, true, true, true}), mqTypePulsar)
assert.Equal(t, mustSelectMQType(true, mqTypeDefault, mqEnable{false, false, true, true}), mqTypePulsar)
assert.Equal(t, mustSelectMQType(true, mqTypeDefault, mqEnable{false, false, false, true}), mqTypeKafka)
assert.Panics(t, func() { mustSelectMQType(true, mqTypeDefault, mqEnable{false, false, false, false}) })