简体   繁体   English

WSO2 ESB异步日志记录,具有更好的性能

[英]WSO2 ESB Asynchronous logging with better performance

We are using WSO2 ESB 4.8.0. 我们正在使用WSO2 ESB 4.8.0。 ESB performance is decreasing When Debugging logging is enabled. 启用“调试日志记录”后,ESB性能下降。 We need a solution to capture request and response from ESB through log mediator and send to REST api asynchronously and the response should be sent to the client with out waiting while logging. 我们需要一种解决方案,以通过日志中介程序捕获来自ESB的请求和响应,并异步发送到REST api,并且应将响应发送到客户端,而无需等待日志记录。

Please suggest any mediators or any sample tutorial how can we do logging asynchronously with out effecting any performance on ESB. 请建议任何中介者或任何示例教程如何在不影响ESB性能的情况下如何异步进行日志记录。

Use clone mediator and manage logging in a dedicated target 使用克隆介体并管理专用目标中的日志记录

In this target, just push your log message in a JMS queue or in JMS message store (OUT_ONLY) 在此目标中,只需将日志消息推送到JMS队列或JMS消息存储库中(OUT_ONLY)

Dequeue this logging queue in a dedicated mediation (use a message processor if you used message store, or define a JMS Proxy reading this queue) 使该日志记录队列在专用中介中出队(如果使用了消息存储,请使用消息处理器,或者定义一个JMS代理来读取此队列)

It's asynchronous, in your mediations, logging will be fast and if your REST API is down or slow, you will not loose any message 它是异步的,在您的中介中,日志记录将很快,并且如果REST API处于关闭或慢速状态,您将不会丢失任何消息

The solution Jean-Michel is describing is called a WireTap. Jean-Michel描述的解决方案称为WireTap。 If you need extra explanation or some implementation details and tricks w/WSO2 ESB check this link : http://pragmaticintegrator.wordpress.com/2013/04/16/implementing-wiretap-eip-in-wso2-esb-proxy-service/ 如果您需要使用WSO2 ESB的额外说明或一些实现细节和技巧,请查看以下链接: http : //pragmaticintegrator.wordpress.com/2013/04/16/implementing-wiretap-eip-in-wso2-esb-proxy-service /

Hope this helps 希望这可以帮助

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

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