Vignesh Prasad V
Vignesh Prasad V

Reputation: 419

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?
I want to get the count in XML configuration, like to be used in proxy service or sequence or message processor etc.
I want it to be used in XML.

Upvotes: 0

Views: 330

Answers (2)

inem88
inem88

Reputation: 327

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())

Upvotes: 1

Vignesh Prasad V
Vignesh Prasad V

Reputation: 419

I got it by pushing the message to db and get as per the count required as in this answer of me take a look at my answer

Upvotes: 0

Related Questions