From db7dfba6079c2f46bed5965b85510c7fcc91bd2e Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Thu, 8 Sep 2016 11:56:38 +0100 Subject: [PATCH] ARTEMIS-720 Add JMSX properties in AMQP<->JMS converter --- .../proton/converter/ActiveMQJMSVendor.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java index 3cfb0a559b..9265abe5a9 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.core.protocol.proton.converter; import javax.jms.BytesMessage; import javax.jms.Destination; +import javax.jms.JMSException; import javax.jms.MapMessage; import javax.jms.Message; import javax.jms.ObjectMessage; @@ -90,19 +91,29 @@ public class ActiveMQJMSVendor implements JMSVendor { try { message.setStringProperty("_AMQ_GROUP_ID", s); } - catch (Exception e) { - e.printStackTrace(); - + catch (JMSException e) { + throw new RuntimeException(e); } } @Override public void setJMSXGroupSequence(Message message, int i) { - + try { + message.setIntProperty("JMSXGroupSeq", i); + } + catch (JMSException e) { + throw new RuntimeException(e); + } } @Override public void setJMSXDeliveryCount(Message message, long l) { + try { + message.setLongProperty("JMSXDeliveryCount", l); + } + catch (JMSException e) { + throw new RuntimeException(e); + } } public ServerJMSMessage wrapMessage(int messageType, ServerMessage wrapped, int deliveryCount) {