@@ -346,7 +346,9 @@ pub enum QueueType {
346
346
Quorum ,
347
347
Stream ,
348
348
// Tanzu RabbitMQ-specific
349
- Delayed
349
+ Delayed ,
350
+ // A type this client is not aware of
351
+ Unsupported
350
352
}
351
353
352
354
impl From < & str > for QueueType {
@@ -356,7 +358,7 @@ impl From<&str> for QueueType {
356
358
"quorum" => QueueType :: Quorum ,
357
359
"stream" => QueueType :: Stream ,
358
360
"delayed" => QueueType :: Delayed ,
359
- _ => QueueType :: Classic ,
361
+ _ => QueueType :: Unsupported ,
360
362
}
361
363
}
362
364
}
@@ -367,7 +369,7 @@ impl From<String> for QueueType {
367
369
"classic" => QueueType :: Classic ,
368
370
"quorum" => QueueType :: Quorum ,
369
371
"stream" => QueueType :: Stream ,
370
- _ => QueueType :: Classic ,
372
+ _ => QueueType :: Unsupported ,
371
373
}
372
374
}
373
375
}
@@ -379,6 +381,7 @@ impl From<QueueType> for String {
379
381
QueueType :: Quorum => "quorum" . to_owned ( ) ,
380
382
QueueType :: Stream => "stream" . to_owned ( ) ,
381
383
QueueType :: Delayed => "delayed" . to_owned ( ) ,
384
+ QueueType :: Unsupported => "unsupported" . to_owned ( ) ,
382
385
}
383
386
}
384
387
}
@@ -459,6 +462,7 @@ impl From<QueueType> for PolicyTarget {
459
462
QueueType :: Quorum => PolicyTarget :: QuorumQueues ,
460
463
QueueType :: Stream => PolicyTarget :: Streams ,
461
464
QueueType :: Delayed => PolicyTarget :: Queues ,
465
+ QueueType :: Unsupported => PolicyTarget :: Queues ,
462
466
}
463
467
}
464
468
}
0 commit comments