- Hands-On Microservices with C#
- Matt R. Cole
- 145字
- 2021-07-23 17:25:20
Creating common messages
Let's start with a very simple message, the deployment messages:
public class DeploymentStartMessage
{
public DateTime Date { get; set; }
}
public class DeploymentStopMessage
{
public DateTime Date { get; set; }
}
As you can see, they are not overly complicated. What will happen is that we will have a DeploymentMonitor microservice. As soon as our deployment kicks off, we will send a DeploymentStartMessage to the message queue. Our microservice manager will receive the message, and immediately disable tracking each microservice's health until the DeploymentStopMessage is received.
Always include all your messages in the same namespace. This makes it much easier for EasyNetQ and its type name resolver to know where the messages are coming from. It also gives you a centralized location for all your messages, and lastly, prevents a lot of weird looking exchange and queue names!
推薦閱讀
- Mastering Proxmox(Third Edition)
- 輕松學(xué)C#
- Mobile DevOps
- 機(jī)器自動(dòng)化控制器原理與應(yīng)用
- JMAG電機(jī)電磁仿真分析與實(shí)例解析
- 讓每張照片都成為佳作的Photoshop后期技法
- AutoCAD 2012中文版繪圖設(shè)計(jì)高手速成
- DevOps:Continuous Delivery,Integration,and Deployment with DevOps
- ESP8266 Home Automation Projects
- 大數(shù)據(jù)驅(qū)動(dòng)的機(jī)械裝備智能運(yùn)維理論及應(yīng)用
- Dreamweaver CS6精彩網(wǎng)頁(yè)制作與網(wǎng)站建設(shè)
- MongoDB 4 Quick Start Guide
- Cortex-M3嵌入式處理器原理與應(yīng)用
- DynamoDB Applied Design Patterns
- 網(wǎng)絡(luò)安全原理與應(yīng)用