[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323945364 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,19 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +// Java serialized objects should be treated as bytes messages +// as we cannot deserialize them in .NET world +case MessageSupport.JMS_TYPE_OBJ when IsContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, GetContentType(message.Properties)): Review comment: yes, i think we were overlapping, current looked good. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323929755 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,26 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: Review comment: i would keep byte here, keep the case handling in the order of they are in JMS and the ordinals. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323928933 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,26 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +return new AmqpNmsBytesMessageFacade(); +case MessageSupport.JMS_TYPE_OBJ: +{ +Symbol contentType = GetContentType(message.Properties); +if (IsContentType(SymbolUtil.SERIALIZED_DOTNET_OBJECT_CONTENT_TYPE, contentType) || contentType == null) Review comment: Can we remove the Serialized_java_object_content_type static in SymbolUtil now? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323928708 ## File path: test/Apache-NMS-AMQP-Test/Provider/Amqp/AmqpCodecTest.cs ## @@ -458,7 +458,6 @@ public void TestNMSMessageEncodingAddsProperMessageAnnotations() DoTestNMSMessageEncodingAddsProperMessageAnnotations(MessageSupport.JMS_TYPE_MAP, null, MessageSupport.JMS_DEST_TYPE_TEMP_QUEUE); DoTestNMSMessageEncodingAddsProperMessageAnnotations(MessageSupport.JMS_TYPE_TXT, MessageSupport.JMS_DEST_TYPE_TOPIC, MessageSupport.JMS_DEST_TYPE_TEMP_QUEUE); DoTestNMSMessageEncodingAddsProperMessageAnnotations(MessageSupport.JMS_TYPE_STRM, MessageSupport.JMS_DEST_TYPE_QUEUE, MessageSupport.JMS_DEST_TYPE_TEMP_QUEUE); - DoTestNMSMessageEncodingAddsProperMessageAnnotations(MessageSupport.JMS_TYPE_OBJ, MessageSupport.JMS_DEST_TYPE_QUEUE, MessageSupport.JMS_DEST_TYPE_TEMP_QUEUE); Review comment: will want a test for the three content type cases, is jms serialized, is .net serialized and none This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323928092 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,26 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +return new AmqpNmsBytesMessageFacade(); +case MessageSupport.JMS_TYPE_OBJ: +{ +Symbol contentType = GetContentType(message.Properties); +if (IsContentType(SymbolUtil.SERIALIZED_DOTNET_OBJECT_CONTENT_TYPE, contentType) || contentType == null) +{ +return new AmqpNmsObjectMessageFacade(); +} + +// If the message has different content type defined we should treat it as bytes message +// as there is a good chance that we cannot deserialize it using .NET binary deserializer +return new AmqpNmsBytesMessageFacade(); Review comment: Yup :) +1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323927309 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,19 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +// Java serialized objects should be treated as bytes messages +// as we cannot deserialize them in .NET world +case MessageSupport.JMS_TYPE_OBJ when IsContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, GetContentType(message.Properties)): Review comment: ``` case MessageSupport.JMS_TYPE_OBJ when HasContentType(message.Properties)): return GetContentType(message.Properties) == ".NET TYPE" ? new AmqpNmsObjectMessageFacade() : new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_OBJ: return new AmqpNmsObjectMessageFacade(); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323927309 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,19 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +// Java serialized objects should be treated as bytes messages +// as we cannot deserialize them in .NET world +case MessageSupport.JMS_TYPE_OBJ when IsContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, GetContentType(message.Properties)): Review comment: ``` case MessageSupport.JMS_TYPE_OBJ when HasContentType(message.Properties)): return GetContentType(message.Properties) == ".NET TYPE" ? new AmqpNmsObjectMessageFacade() : new AmqpNmsBytesMessageFacade(); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323926285 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,19 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +// Java serialized objects should be treated as bytes messages +// as we cannot deserialize them in .NET world +case MessageSupport.JMS_TYPE_OBJ when IsContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, GetContentType(message.Properties)): Review comment: that way imagine someone made a XMS impl for AMQP where X = some other lang, then you dont need worry, as you only handle where its positively the serialized type you can support which is .net varient. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [activemq-nms-amqp] michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set
michaelandrepearce commented on a change in pull request #31: AMQNET-612: ObjectMessage shouldn't have jms-msg-type set URL: https://github.com/apache/activemq-nms-amqp/pull/31#discussion_r323925428 ## File path: src/NMS.AMQP/Provider/Amqp/Message/AmqpCodec.cs ## @@ -55,16 +55,19 @@ private static AmqpNmsMessageFacade CreateFromMsgAnnotation(MessageAnnotations m { case MessageSupport.JMS_TYPE_MSG: return new AmqpNmsMessageFacade(); -case MessageSupport.JMS_TYPE_BYTE: -return new AmqpNmsBytesMessageFacade(); case MessageSupport.JMS_TYPE_TXT: return new AmqpNmsTextMessageFacade(); -case MessageSupport.JMS_TYPE_OBJ: -return new AmqpNmsObjectMessageFacade(); case MessageSupport.JMS_TYPE_STRM: return new AmqpNmsStreamMessageFacade(); case MessageSupport.JMS_TYPE_MAP: return new AmqpNmsMapMessageFacade(); +case MessageSupport.JMS_TYPE_BYTE: +// Java serialized objects should be treated as bytes messages +// as we cannot deserialize them in .NET world +case MessageSupport.JMS_TYPE_OBJ when IsContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, GetContentType(message.Properties)): Review comment: id inverse this logic, and make it that if it has content type, then if content type = .net return object else return byte This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services