- Hands-On Microservices with C#
- Matt R. Cole
- 198字
- 2021-07-23 17:25:21
The subscription ID that you pass to subscribe is important
EasyNetQ will create a unique queue on the RabbitMQ broker for each unique combination of message type and subscription ID. Each call to Subscribe creates a new queue consumer. If you call the Subscribe method two times with the same message type and subscription ID, you will create two consumers consuming from the same queue. RabbitMQ will then round-robin successive messages to each consumer in turn. This is great for scaling and work-sharing. Say you've created a service that processes a particular message, but it's getting overloaded with work. Simply start a new instance of that service (on the same machine, or a different one) and without having to configure anything, you get automatic scaling.
If you call the Subscribe method two times with different subscription IDs but the same message type, you will create two queues, each with its own consumer. A copy of each message of the given type will be routed to each queue, so each consumer will get all the messages (of that type). This is great if you've got several different services that all care about the same message type.
- Splunk 7 Essentials(Third Edition)
- Microsoft Power BI Quick Start Guide
- Seven NoSQL Databases in a Week
- 并行數(shù)據(jù)挖掘及性能優(yōu)化:關聯(lián)規(guī)則與數(shù)據(jù)相關性分析
- Hands-On Machine Learning with TensorFlow.js
- 群體智能與數(shù)據(jù)挖掘
- 視覺檢測技術及智能計算
- Hybrid Cloud for Architects
- The Python Workshop
- Practical Big Data Analytics
- 從零開始學JavaScript
- 常用傳感器技術及應用(第2版)
- 手把手教你學Photoshop CS3
- 百度智能小程序:AI賦能新機遇
- 自動化生產(chǎn)線組建與調試(第2版):以亞龍YL-335B為例(三菱PLC版本)