简体   繁体   English

获取wso2 esb中内存中消息存储中的消息计数

[英]Get the count of messages in-memory message store in wso2 esb

How to get the count of messages in-memory message store in WSO2 ESB? 如何获取WSO2 ESB中的内存中消息存储中的消息计数?
I want to get the count in XML configuration, like to be used in proxy service or sequence or message processor etc. 我想获取XML配置中的计数,例如用于代理服务或序列或消息处理器等。
I want it to be used in XML. 我希望将其用于XML。

You can use script mediator with this code: 您可以将脚本中介程序与以下代码一起使用:

var msg_store = mc.getConfiguration().getMessageStore('YourMessageStoreName')
var log = mc.getServiceLog()
log.info("Current size of Message Store "+msg_store.size())

我通过将消息推送到db并按照我在此答案中所需的计数来获得它, 看看我的答案

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

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