官术网_书友最值得收藏!

Messaging patterns

Messaging patterns help in connecting services in a loosely coupled manner. What it means is that services never talk to each other directly. Instead, a service generates and sends a message to a broker (generally a queue) and any other service that is interested in that message can pick it and process it. There is no direct communication between the sender and receiver service. This decouples not only makes services and overall application more reliable, but also more robust and fault tolerant. Receivers can receive and read messages at their own capable speed.

Messaging helps in creating asynchronous patterns. Messaging involves sending messages from one entity to another. These messages are created and forwarded by a sender, stored at durable storage, and finally consumed by recipients.

The top architectural concerns addressed by messaging are the following:

  • Durability: Messages are stored in durable storage and the application can read it later after they come up in case of prior failure
  • Reliability: Messages help in implementing reliability with design since messages are not lost because they are persisted in disk
  • Availability of messages: The messages are available for consumption by applications after restoration of connectivity and prior downtime

Azure provides service bus queues and topics to implement messaging patterns within applications. Storage queue can also be used for the same purpose.

Choosing between Azure service bus queue and storage queue is to decide between how long the message should be stored, size of the message, latency, and cost.

Azure service bus provides support for 256 KB message size, while storage queue provides support for 64 KB message size. Azure service bus can store messages for an unlimited period, while storage queue can store messages for seven days.

The cost and latency are higher in case of service bus queues.

Depending on application requirements and needs the preceding factors should be employed before deciding the best queue.

主站蜘蛛池模板: 新龙县| 五寨县| 谷城县| 龙川县| 雅江县| 许昌市| 彭阳县| 那曲县| 宁德市| 伊宁市| 昂仁县| 潮安县| 南康市| 松阳县| 泾川县| 象州县| 张家港市| 云梦县| 柳河县| 清涧县| 兴化市| 徐闻县| 海原县| 东至县| 嘉鱼县| 文水县| 新蔡县| 陆河县| 河津市| 慈利县| 收藏| 海兴县| 台东市| 太白县| 绵竹市| 新乡县| 交城县| 雷波县| 东山县| 甘孜| 彭泽县|