1 18 package org.apache.activemq.broker.util; 19 20 import org.apache.activemq.broker.BrokerPluginSupport; 21 import org.apache.activemq.broker.ConnectionContext; 22 import org.apache.activemq.broker.ProducerBrokerExchange; 23 import org.apache.activemq.command.Message; 24 25 26 40 public class TimeStampingBrokerPlugin extends BrokerPluginSupport { 41 public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception { 42 if (message.getTimestamp() > 0 && (message.getBrokerPath() == null || message.getBrokerPath().length == 0)) { 43 message.setTimestamp(System.currentTimeMillis()); 45 } 46 super.send(producerExchange, message); 47 } 48 } 49 | Popular Tags |