File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ RedisChannel::RedisChannel(
2525 m_getConsumer = std::make_shared<swss::ConsumerTable>(m_db.get (), REDIS_TABLE_GETRESPONSE);
2626
2727 m_dbNtf = std::make_shared<swss::DBConnector>(dbAsic, 0 );
28- m_notificationConsumer = std::make_shared<swss::NotificationConsumer>(m_dbNtf.get (), REDIS_TABLE_NOTIFICATIONS );
28+ m_notificationConsumer = std::make_shared<swss::NotificationConsumer>(m_dbNtf.get (), REDIS_TABLE_NOTIFICATIONS_PER_DB (dbAsic) );
2929
3030 m_runNotificationThread = true ;
3131
Original file line number Diff line number Diff line change 6767 */
6868#define REDIS_TABLE_NOTIFICATIONS "NOTIFICATIONS"
6969
70+ /**
71+ * @brief Table which will be used to forward notifications per DB scope
72+ *
73+ * In https://redis.io/docs/manual/pubsub/, it says:
74+ * "Pub/Sub has no relation to the key space. It was made to not interfere with
75+ * it on any level, including database numbers."
76+ */
77+ #define REDIS_TABLE_NOTIFICATIONS_PER_DB (dbName ) \
78+ ((dbName) == "ASIC_DB" ? \
79+ REDIS_TABLE_NOTIFICATIONS : \
80+ (dbName) + "_" + REDIS_TABLE_NOTIFICATIONS)
81+
7082/**
7183 * @brief Table which will be used to send API response from syncd.
7284 */
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ RedisNotificationProducer::RedisNotificationProducer(
1313
1414 m_db = std::make_shared<swss::DBConnector>(dbName, 0 );
1515
16- m_notificationProducer = std::make_shared<swss::NotificationProducer>(m_db.get (), REDIS_TABLE_NOTIFICATIONS );
16+ m_notificationProducer = std::make_shared<swss::NotificationProducer>(m_db.get (), REDIS_TABLE_NOTIFICATIONS_PER_DB (dbName) );
1717}
1818
1919void RedisNotificationProducer::send (
Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ inseg
231231Inseg
232232INSEG
233233insegs
234+ io
234235ip
235236IP
236237ipc
@@ -308,6 +309,7 @@ PORTs
308309pre
309310printf
310311ptr
312+ pubsub
311313qos
312314queueCounterIds
313315queueId
You can’t perform that action at this time.
0 commit comments