implement topic matching

This commit is contained in:
nora 2022-03-20 20:40:02 +01:00
parent 2abc577aca
commit 92e3ac486b

View file

@ -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,