Azure事件网格,逻辑应用程序和表存储 [英] Azure Event Grid, Logic Apps and Table Storage

查看:69
本文介绍了Azure事件网格,逻辑应用程序和表存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



大家好, 



我正在测试CRM系统每当发布客户记录中的关键字段的情况对事件网格主题进行更改。然后,它会向更新下游系统的多个订阅逻辑应用程序事件处理程序扇出。我在事件网格有效负载中包含了
关键字段(例如公司名称,地址,邮政编码等),因此无论出于何种原因逻辑应用程序失败,都可以重新提交。我想要做更多简单的离散事件有效负载,例如Record Created,Record Updated等,然后在
中逻辑应用程序转到源并检索最新版本的记录。然而,这可能会导致对源系统的过多调用,并且如果其中一个处理程序失败,如果更改发生了
,则可能会获得不同版本的记录(其他处理程序最终会赶上)。我想避免的是在失败的运行中执行重新提交,其中更新的版本在事后发生。该网络讨论了智能终端并跟踪每个终端以
应用的版本。所以我想到使用表存储来跟踪每个端点以及应用了哪个版本的源记录。当逻辑应用程序运行时(通过从Grid接收或通过重新提交),它会根据表
store中的版本检查有效负载,如果它的旧版本未应用。几个问题



1.使用上述技术是否有更简单的设计。我喜欢网格功能,我只关心最新版本的记录,因为每个处理程序执行一个upsert。



2.是否有一种快速的方式来有条件地更新表存储记录的版本号。我已经完成了upsert但是我只想在记录更新的情况下进行upsert。我可以提取一个值并在逻辑应用程序中检查它,但它是更多的步骤。我可以很容易地在SQL中执行
我只有一个表存储TargetSys,CsutomerID,RecordVersion 


Hi All, 

I am testing a scenario where a CRM system is publishing key fields from the customer record whenever changes are made to an event grid topic. This then fans out to multiple subscribing logic app event handlers which update downstream systems. I am including the keyfields (e.g. company name, address, zip etc) in the event grid payload so for whatever reason the logic app fails it can be resubmitted. I thought of doing more of a simple discrete event payload such as Record Created, Record Updated etc and then in the logic app going to the source and retrieving the latest version of the record. This however would probably cause excessive calls to the source system and if one of the handlers fails it could possibly get a different version of the record if a change has occurred (others handlers would eventually catch-up). What I want to avoid is performing a resubmit on a failed run where a newer version has come in after the fact. The net talks about smart endpoints and keeping track of versions that have been applied at each endpoint. So I thought of using table storage to keep track of each endpoint and what version of the source record had been applied. When a logic app runs (either by receiving from Grid or by resubmit) it checks the payload against the version in table store if its older then it is not applied. Couple of questions

1. Is there a simpler design using the above technologies. I like the Grid functionality and I only really care about the latest version of the record since each handler performs an upsert.

2. Is there a quick way to conditionally update the table store record based version number. I have done upsert but I only want to upsert if the record is newer. I could extract a value and check it in the logic app but it is more steps. I could do this easily in SQL I would have only one table storing the TargetSys, CsutomerID, RecordVersion 

推荐答案

我可以在这里建议你两种方法:

I can suggest you two approaches here:

1。使用服务总线队列,它将帮助您以顺序方式处理消息,因此首先将消息从事件网格主题发送到服务总线队列,然后逻辑应用程序将处理它们。这样你就会总是有最新的消息处理
,如果有什么失败,那么消息将以死信队列结束,你可以有自己的逻辑从deadletter队列重新处理它们但是不会打扰主处理。

1. use service bus queue, it will help you to process the message in sequential manner, so first send the message from event grid topic to a service bus queue and then logic apps will process them. this way you you will always have the latest message processing and if anything fails, then the message will end up in dead-letter queue and you can have your own logic to reprocess them from deadletter queue but wont bother the main processing.

2。如果 仍然上面的方法没有解决你的问题,那么你需要持久性,我建议你在这种情况下使用SQL Azure。

2. if  still the above approach is not addressing your concern then you need persistence and i would recommend you to use SQL Azure in this case.


这篇关于Azure事件网格,逻辑应用程序和表存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆