Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(router): subscriber return type (#1292)

Kartikeya Hegde55bb117e1ddc
diff --git a/crates/router/src/services.rs b/crates/router/src/services.rs
index 42f9602d7a..1e1bd40db6 100644
--- a/crates/router/src/services.rs
+++ b/crates/router/src/services.rs
@@ -23,10 +23,7 @@ use crate::{
#[async_trait::async_trait]
pub trait PubSubInterface {
- async fn subscribe(
- &self,
- channel: &str,
- ) -> errors::CustomResult<usize, redis_errors::RedisError>;
+ async fn subscribe(&self, channel: &str) -> errors::CustomResult<(), redis_errors::RedisError>;
async fn publish<'a>(
&self,
@@ -40,10 +37,7 @@ pub trait PubSubInterface {
#[async_trait::async_trait]
impl PubSubInterface for redis_interface::RedisConnectionPool {
#[inline]
- async fn subscribe(
- &self,
- channel: &str,
- ) -> errors::CustomResult<usize, redis_errors::RedisError> {
+ async fn subscribe(&self, channel: &str) -> errors::CustomResult<(), redis_errors::RedisError> {
// Spawns a task that will automatically re-subscribe to any channels or channel patterns used by the client.
self.subscriber.manage_subscriptions();