简体   繁体   English

Azure Worker角色扩展

[英]Azure Worker Role Scaling

I am using an Azure Storage Queue and associated Worker Role to integrate a legacy system with a new system. 我正在使用Azure存储队列和关联的工作人员角色将旧系统与新系统集成。

In brief, the legacy system sends application details to the queue, and the application details include a status such as "Pending", "Approved", "Cancelled" and "Completed". 简而言之,旧系统将应用程序详细信息发送到队列,并且应用程序详细信息包括诸如“待处理”,“已批准”,“已取消”和“已完成”的状态。

The same application can be in the queue with different status (more than one message referring to same application). 同一应用程序可以处于状态不同的队列中(不止一条消息引用同一应用程序)。

If we scale up the Worker Role instance to 2, it is possible to process different statuses of the same application by two different worker roles. 如果将工作人员角色实例扩展到2,则可以通过两个不同的工作人员角色来处理同一应用程序的不同状态。 - Instance 1 process message with application status "Pending" - Instance 2 process message with application status "Approved" -实例1过程消息的应用程序状态为“待决”-实例2过程消息的应用程序状态为“已批准”

I want to handle FIFO to messages with same application details even if there are many worker roles. 我想处理具有相同应用程序详细信息的消息的FIFO,即使有许多辅助角色也是如此。

I am looking for an implementation method that will allow scaling of my Worker Roles whilst ensuring that I can sequentially process messages that relate to a given application. 我正在寻找一种实现方法,该方法可以扩展我的工作人员角色,同时确保我可以顺序处理与给定应用程序相关的消息。

I found a good resource that solve the problem. 我找到了解决问题的好资源。 Please follow the link Here . 请点击这里链接。

Don't put the data in the queue. 不要将数据放入队列。 Put it in the database. 将其放入数据库中。 Only enqueue the information that you have to perform some work on a given application. 仅排队在给定应用程序上执行某些工作所需的信息。 The worker can the look into the database and see all the work for that application. 工作人员可以查看数据库并查看该应用程序的所有工作。

That way duplicate or out-of-order message delivery does not hurt. 这样,重复或无序的邮件传递不会受到影响。 Duplicate delivery can happen anyway and you have to deal with it. 无论如何,重复交付都可能发生,您必须应对它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM