RabbitMQ 同时发布和使用同一个队列
RabbitMQ publish and consume same queue in simultaneously
我有一个 RabbitMQ 消息队列,我想从 Web 服务调用 ServiceA 向队列发布多条消息。同时,还有另一个名为 ServiceB 的 Web 服务,它被实现为以 10 秒的时间间隔从 RabbitMQ 同一队列中消费消息。这个用例是否可以通过 RabbitMQ 队列的实现实现?
RabbitMQ是否支持发布者和消费者同时(同时)访问同一个队列?
ServiceB which is implemented for consuming the messages from the RabbitMQ same queue in an interval of 10 seconds time period.
用RabbitMQ实现这个有点奇怪。在 RabbitMQ 中,消费者通道将立即收到消息,除非它的 unAck 消息达到 the prefetch limit。我建议在 RabbitMQ 消费者和 ServiceB.
之间添加一个 缓冲区缓存(每 10 秒刷新一次)
Does RabbitMQ support to access the same queue by the publisher and consumer at the same time (simultaneously)?
在RabbitMQ中,publisher不能直接访问queue,只能发布消息给exchange,RabbitMQ Daemon会通过exchange绑定规则路由消息。换句话说,发布者和消费者可以同时独立工作。
我有一个 RabbitMQ 消息队列,我想从 Web 服务调用 ServiceA 向队列发布多条消息。同时,还有另一个名为 ServiceB 的 Web 服务,它被实现为以 10 秒的时间间隔从 RabbitMQ 同一队列中消费消息。这个用例是否可以通过 RabbitMQ 队列的实现实现?
RabbitMQ是否支持发布者和消费者同时(同时)访问同一个队列?
ServiceB which is implemented for consuming the messages from the RabbitMQ same queue in an interval of 10 seconds time period.
用RabbitMQ实现这个有点奇怪。在 RabbitMQ 中,消费者通道将立即收到消息,除非它的 unAck 消息达到 the prefetch limit。我建议在 RabbitMQ 消费者和 ServiceB.
之间添加一个 缓冲区缓存(每 10 秒刷新一次)Does RabbitMQ support to access the same queue by the publisher and consumer at the same time (simultaneously)?
在RabbitMQ中,publisher不能直接访问queue,只能发布消息给exchange,RabbitMQ Daemon会通过exchange绑定规则路由消息。换句话说,发布者和消费者可以同时独立工作。