Timer samplingTimer = synapseEnvironment.getSynapseConfiguration().getSynapseTimer();
messageProcessor = new MessageProcessor();
log.info("Scheduling the sampling timer to invoke the message processor " +
"at an interval of : " + unitTime);
samplingTimer.schedule(messageProcessor, 0, unitTime);
}
public void destroy() {
messageProcessor.cancel();
if (!messageQueue.isEmpty()) {