gpt4 book ai didi

node.js - 仅将我的消息发送到订阅的服务器,而不是我的其他服务器

转载 作者:可可西里 更新时间:2023-11-01 11:26:58 26 4
gpt4 key购买 nike

我如何将发布到 Redis channel 的消息仅发送到订阅服务器(连接到订阅者)而不发送到我的其他服务器(所需订阅者未连接)。

我正在使用 Socket.IO 和 Redis 服务器。

最佳答案

你读过documentation吗? ?

not programmed to send their messages to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what (if any) subscribers there may be

换句话说,您不能针对特定订阅者。

根据您要实现的目标,您可以考虑使用多个 channel ,每个消费者使用自己的 channel 。

关于node.js - 仅将我的消息发送到订阅的服务器,而不是我的其他服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44779943/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com