From b0fc4e69e23547ef5bbf3570e324bb91bb7ee04f Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Fri, 25 Oct 2024 22:46:31 +0200 Subject: [PATCH] lib.rs: removed the need to define a consumer tag --- src/lib.rs | 6 ++---- src/test/mod.rs | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 603d71d..f6f37e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,7 +78,6 @@ impl BunBunWorker { pub async fn add_non_rpc_consumer( &mut self, queue_name: &str, - consumer_tag: &str, state: Arc>, ) where ::State: std::marker::Send, @@ -87,7 +86,7 @@ impl BunBunWorker { .channel .basic_consume( queue_name, - consumer_tag, + "", BasicConsumeOptions::default(), FieldTable::default(), ) @@ -125,7 +124,6 @@ impl BunBunWorker { pub async fn add_rpc_consumer( &mut self, queue_name: &str, - consumer_tag: &str, state: Arc>, ) where ::State: std::marker::Send, @@ -136,7 +134,7 @@ impl BunBunWorker { .channel .basic_consume( queue_name, - consumer_tag, + "", BasicConsumeOptions::default(), FieldTable::default(), ) diff --git a/src/test/mod.rs b/src/test/mod.rs index 8bc7d5f..419a8ac 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -88,7 +88,6 @@ mod test { listener .add_rpc_consumer::( "email-emailjob-v1.0.0", - "emailjob", Arc::new(Mutex::new(State { something: "test".into(), })), @@ -107,7 +106,6 @@ mod test { listener .add_rpc_consumer::( "email-emailjob-v1.0.0", - "emailjob", Arc::new(Mutex::new(State { something: "test".into(), })),