web stats
Mirth Community - View Single Post - DIY Queue Depth Alerts
View Single Post
Old 02-20-2011, 06:04 AM
seaston seaston is offline
OBX.3 Kenobi
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road

Thanks for the example. I will try using this, but have simplified by removing the database lookup for the queue count as shown by using the channelStatisticsController:

var channelStatisticsController = Packages.com.mirth.connect.server.controllers.Chan nelStatisticsController.getInstance();
var stats = channelStatisticsController.getStatistics(channelI d);
var numOfQueued = stats.queued;

if(numOfQueued % 100 == 0 && numOfQueued != 0)
//Generate an alert
alerts.sendAlert("\n\nChannel: "+channelName+"\n\nQueue Depth: "+numOfQueued);


Last edited by seaston; 02-20-2011 at 06:06 AM.
Reply With Quote