- 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.
- 自動控制工程設計入門
- Effective DevOps with AWS
- Hands-On Reactive Programming with Reactor
- 啊哈C!思考快你一步
- INSTANT VMware vCloud Starter
- Linux系統下C程序開發詳解
- 傳感器原理及實用技術
- Learn Microsoft Azure
- 從零開始學ASP.NET
- 大型機系統應用基礎
- PostgreSQL 10 High Performance
- Getting Started with Tableau 2018.x
- 超好玩的Python少兒編程
- Learning Couchbase
- 網絡設備規劃、配置與管理大全(Cisco版)