简体   繁体   English

可以在wso2 esb或ei中缓存调解器组的相同请求吗?

[英]Can cache mediator group same request in wso2 esb or ei?

I try to use cache mediator. 我尝试使用缓存中介器。 But when cache dont contain response and I make two same requests, they both throw. 但是,当缓存不包含响应并且我发出两个相同的请求时,它们都会抛出。 But I want the second request wait until first will be cached. 但是我希望第二个请求等到第一个请求被缓存。 How it csn be done in WSO2 ? 如何在WSO2中完成?

There are several ways to implements this. 有几种方法可以实现此目的。 First use queue, second use property to mark that request is going on right now. 第一次使用队列,第二次使用属性来标记该请求正在进行中。

Second solution is kind of tricky if request will fail, then faulty sequence will start, and need to reset property in that sequence. 第二种解决方案是棘手的,如果请求失败,那么错误的序列将开始,并且需要重置该序列中的属性。

Second what does it mean wait for first request? 其次,等待第一个请求意味着什么? Hold connection and do not respond while first request will not populate cache or just respond quickly "server is too busy" (also legal). 保持连接并且不响应,而第一个请求将不会填充缓存,或者只是快速响应“服务器太忙”(也是合法的)。

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

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