boolean changed = monitorConnectors(routingEngine.getApplications(), applications,
Direction.TO_APPLICATIONS);
changed = monitorConnectors(routingEngine.getConnections(), connections,
Direction.TO_CONNECTIONS) ? true : changed;
MessageCriteria criteria = new MessageCriteria()
.addStatus(Message.STATUS_FAILED)
.addStatus(Message.STATUS_RETRYING);
int actualFailed = routingEngine.getMessageStore().list(criteria).size();
if (failed != actualFailed) {
failed = actualFailed;
try {
JSONObject json = new JSONObject().put("eventType", "FAILED_CHANGED")
.put( "data", new JSONObject().put("value", failed) );
broadcaster.broadcast(json.toString());
} catch (JSONException e) {
log.error("JSONException while notifying failed: " + e.getMessage(), e);
}
changed = true;
}
criteria = new MessageCriteria().addStatus(Message.STATUS_UNROUTABLE);
int actualUnroutable = routingEngine.getMessageStore().list(criteria).size();
if (unroutable != actualUnroutable) {
unroutable = actualUnroutable;
try {
JSONObject json = new JSONObject().put("eventType", "UNROUTABLE_CHANGED")