milestone: add runtime template state and dlq/retry broker topology

This commit is contained in:
2026-04-06 18:41:17 -07:00
parent 836a968806
commit 516a740505
12 changed files with 838 additions and 273 deletions
+13
View File
@@ -31,6 +31,7 @@ use super::error::AmqpError;
/// The name of the BEDS topic exchange. All events in the cluster are
/// published to this exchange and routed by key to their consumers.
pub const EXCHANGE_NAME: &str = "beds.events";
pub const DLX_EXCHANGE_NAME: &str = "beds.dlx";
/// An authenticated AMQP connection with an open channel.
///
@@ -130,6 +131,18 @@ impl AmqpConnection {
)
.await?;
self.channel
.exchange_declare(
DLX_EXCHANGE_NAME,
ExchangeKind::Topic,
ExchangeDeclareOptions {
durable: true,
..Default::default()
},
FieldTable::default(),
)
.await?;
Ok(())
}
}
+1 -1
View File
@@ -18,7 +18,7 @@
pub mod connection;
pub mod error;
pub use connection::{AmqpConnection, EXCHANGE_NAME};
pub use connection::{AmqpConnection, DLX_EXCHANGE_NAME, EXCHANGE_NAME};
pub use error::AmqpError; // will be used by broker pool error handling
use std::net::{TcpStream, ToSocketAddrs};