Set timestamp on the broker

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@376260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-02-09 11:06:41 +00:00
parent e99fc62e4a
commit b59d0b5938
1 changed files with 4 additions and 0 deletions

View File

@ -296,6 +296,10 @@ public class RegionBroker implements Broker {
public void send(ConnectionContext context, Message message) throws Throwable {
message.getMessageId().setBrokerSequenceId(sequenceGenerator.getNextSequenceId());
if (message.getTimestamp() > 0 && (message.getBrokerPath() == null | message.getBrokerPath().length == 0)) {
//timestamp not been disabled and has not passed through a network
message.setTimestamp(System.currentTimeMillis());
}
ActiveMQDestination destination = message.getDestination();
switch(destination.getDestinationType()) {
case ActiveMQDestination.QUEUE_TYPE: