mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
implement topic matching
This commit is contained in:
parent
2abc577aca
commit
92e3ac486b
1 changed files with 1 additions and 3 deletions
|
|
@ -1,5 +1,3 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use haesli_core::{
|
||||
exchange::{Exchange, ExchangeType, TopicSegment},
|
||||
queue::Queue,
|
||||
|
|
@ -7,7 +5,7 @@ use haesli_core::{
|
|||
|
||||
fn parse_topic(topic: &str) -> Vec<TopicSegment> {
|
||||
topic
|
||||
.split(".")
|
||||
.split('.')
|
||||
.map(|segment| match segment {
|
||||
"*" => TopicSegment::SingleWildcard,
|
||||
"#" => TopicSegment::MultiWildcard,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue