mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-25 02:41:27 +01:00
feat: implement RabbitMQ connection and queue management in new module
This commit is contained in:
10
src/server.rs
Normal file
10
src/server.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use zettle_db::rabbitmq::RabbitMQ;
|
||||
|
||||
#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn main() {
|
||||
let rabbitmq = RabbitMQ::new().await;
|
||||
let queue_name = rabbitmq.declare_queue("amqprs.examples.basic").await;
|
||||
rabbitmq.bind_queue(&queue_name.0, "amq.topic", "amqprs.example").await;
|
||||
//...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user