activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1793: ARTEMIS-1498: Openwire internal headers...
Date Fri, 02 Feb 2018 10:23:46 GMT
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1793#discussion_r165608418
  
    --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
---
    @@ -576,308 +334,54 @@ private static ActiveMQMessage toAMQMessage(MessageReference reference,
           amqMsg.setExpiration(coreMessage.getExpiration());
           amqMsg.setPriority(coreMessage.getPriority());
           amqMsg.setTimestamp(coreMessage.getTimestamp());
    -
    -      Long brokerInTime = (Long) coreMessage.getObjectProperty(AMQ_MSG_BROKER_IN_TIME);
    -      if (brokerInTime == null) {
    -         brokerInTime = 0L;
    -      }
    -      amqMsg.setBrokerInTime(brokerInTime);
    -
           amqMsg.setCompressed(isCompressed);
     
    -      //we need check null because messages may come from other clients
    -      //and those amq specific attribute may not be set.
    -      Long arrival = (Long) coreMessage.getObjectProperty(AMQ_MSG_ARRIVAL);
    -      if (arrival == null) {
    -         //messages from other sources (like core client) may not set this prop
    -         arrival = 0L;
    -      }
    -      amqMsg.setArrival(arrival);
    -
    -      final String brokerPath = (String) coreMessage.getObjectProperty(AMQ_MSG_BROKER_PATH);
    -      if (brokerPath != null && !brokerPath.isEmpty()) {
    -         setAMQMsgBrokerPath(amqMsg, brokerPath);
    -      }
    -
    -      final String clusterPath = (String) coreMessage.getObjectProperty(AMQ_MSG_CLUSTER);
    -      if (clusterPath != null && !clusterPath.isEmpty()) {
    -         setAMQMsgClusterPath(amqMsg, clusterPath);
    -      }
    -
    -      Integer commandId = (Integer) coreMessage.getObjectProperty(AMQ_MSG_COMMAND_ID);
    -      if (commandId == null) {
    -         commandId = -1;
    -      }
    -      amqMsg.setCommandId(commandId);
    -
           final SimpleString corrId = (SimpleString) coreMessage.getObjectProperty(JMS_CORRELATION_ID_PROPERTY);
           if (corrId != null) {
              amqMsg.setCorrelationId(corrId.toString());
           }
     
    -      final byte[] dsBytes = (byte[]) coreMessage.getObjectProperty(AMQ_MSG_DATASTRUCTURE);
    -      if (dsBytes != null) {
    -         setAMQMsgDataStructure(amqMsg, marshaller, dsBytes);
    -      }
    -      final ActiveMQDestination actualDestination = consumer.getOpenwireDestination();
    -      amqMsg.setDestination(OpenWireUtil.toAMQAddress(coreMessage, actualDestination));
    -
    -      final Object value = coreMessage.getGroupID();
    --- End diff --
    
    It is `SimpleString` to could be used the exact type instead of `Object`


---

Mime
View raw message