From 31055b6f0af76e64bdfe4d13d264bff10c3ec6f5 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Wed, 20 Apr 2016 22:32:24 -0400 Subject: [PATCH 1/2] Removing Marshalled property from Openwire --- .../openwire/OpenWireMessageConverter.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java index cfe5b47d0da..121560f870d 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java @@ -90,8 +90,6 @@ public class OpenWireMessageConverter implements MessageConverter { private static final String AMQ_MSG_MARSHALL_PROP = AMQ_PREFIX + "MARSHALL_PROP"; private static final String AMQ_MSG_REPLY_TO = AMQ_PREFIX + "REPLY_TO"; - private static final String AMQ_MSG_CONSUMER_ID = AMQ_PREFIX + "CONSUMER_ID"; - private static final String AMQ_MSG_TX_ID = AMQ_PREFIX + "TX_ID"; private static final String AMQ_MSG_USER_ID = AMQ_PREFIX + "USER_ID"; private static final String AMQ_MSG_DROPPABLE = AMQ_PREFIX + "DROPPABLE"; @@ -382,17 +380,6 @@ else if (contents != null) { ConsumerId consumerId = messageSend.getTargetConsumerId(); - if (consumerId != null) { - ByteSequence consumerIdBytes = marshaller.marshal(consumerId); - consumerIdBytes.compact(); - coreMessage.putBytesProperty(AMQ_MSG_CONSUMER_ID, consumerIdBytes.data); - } - TransactionId txId = messageSend.getTransactionId(); - if (txId != null) { - ByteSequence txIdBytes = marshaller.marshal(txId); - txIdBytes.compact(); - coreMessage.putBytesProperty(AMQ_MSG_TX_ID, txIdBytes.data); - } String userId = messageSend.getUserID(); if (userId != null) { @@ -769,17 +756,6 @@ else if (coreType == org.apache.activemq.artemis.api.core.Message.BYTES_TYPE) { amqMsg.setReplyTo(replyTo); } - byte[] consumerIdBytes = (byte[]) coreMessage.getObjectProperty(AMQ_MSG_CONSUMER_ID); - if (consumerIdBytes != null) { - ConsumerId consumerId = (ConsumerId) marshaller.unmarshal(new ByteSequence(consumerIdBytes)); - amqMsg.setTargetConsumerId(consumerId); - } - - byte[] txIdBytes = (byte[]) coreMessage.getObjectProperty(AMQ_MSG_TX_ID); - if (txIdBytes != null) { - TransactionId txId = (TransactionId) marshaller.unmarshal(new ByteSequence(txIdBytes)); - amqMsg.setTransactionId(txId); - } String userId = (String) coreMessage.getObjectProperty(AMQ_MSG_USER_ID); if (userId != null) { From 172de47ce08bc27e977566f71960aba73f4a2f87 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 21 Apr 2016 10:44:50 -0400 Subject: [PATCH 2/2] Created queue should be durable on openwire --- .../artemis/core/protocol/openwire/OpenWireConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java index a9cbf0c2343..b1f892ab58b 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java @@ -692,7 +692,7 @@ public void addDestination(DestinationInfo info) throws Exception { CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE : CheckType.CREATE_DURABLE_QUEUE; server.getSecurityStore().check(qName, checkType, this); server.checkQueueCreationLimit(getUsername()); - server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()), false, false); + server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()), true, false); } }