cjwmorgan-sol commented on a change in pull request #4: AMQNET-589: Failover
implementation
URL: https://github.com/apache/activemq-nms-amqp/pull/4#discussion_r303134303
##########
File path: src/NMS.AMQP/Message/Facade/INmsMessageFacade.cs
##########
@@ -15,47 +15,28 @@
* limitations under the License.
*/
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Apache.NMS;
-
-namespace Apache.NMS.AMQP.Message.Cloak
+namespace Apache.NMS.AMQP.Message.Facade
{
- /// <summary>
- /// Provider specific Cloak Interface from provider implementation.
- /// </summary>
- interface IMessageCloak : IMessage
+ public interface INmsMessageFacade
{
- byte[] Content
- {
- get;
- set;
- }
-
- bool IsBodyReadOnly { get; set; }
-
- bool IsPropertiesReadOnly { get; set; }
-
- bool IsReceived { get; }
-
- IMessageCloak Copy();
-
- object GetMessageAnnotation(string symbolKey);
-
- void SetMessageAnnotation(string symbolKey, object value);
-
- object GetDeliveryAnnotation(string symbolKey);
-
- void SetDeliveryAnnotation(string symbolKey, object value);
-
+ NmsMessage AsMessage();
+ void ClearBody();
int DeliveryCount { get; set; }
-
int RedeliveryCount { get; set; }
-
- MessageAcknowledgementHandler AckHandler { get; set; }
-
+ void OnSend(TimeSpan producerTtl);
+ string NMSMessageId { get; set; }
+ IPrimitiveMap Properties { get; }
+ string NMSCorrelationID { get; set; }
+ IDestination NMSDestination { get; set; }
+ TimeSpan NMSTimeToLive { get; set; }
+ MsgDeliveryMode NMSDeliveryMode { get; set; }
+ MsgPriority NMSPriority { get; set; }
+ bool NMSRedelivered { get; set; }
+ IDestination NMSReplyTo { get; set; }
+ DateTime NMSTimestamp { get; set; }
+ string NMSType { get; set; }
+ DateTime Expiration { get; set; }
+ double JmsMsgType { get; }
Review comment:
Why the type double for JmsMsgType? The qpid implementation uses a signed
byte. I found using Helloworld the JMS msg type annotation is of type is
double. This breaks the [JMS to amqp bind mapping
restriction](https://www.oasis-open.org/committees/download.php/60574/amqp-bindmap-jms-v1.0-wd09.pdf)
Section 3.2.4.1 for sending messages where the msg type annotation must be of
type byte (signed byte if you want to inter-operable with qpid jms though).
I would suggest changing the type of the JmsMsgType to sbyte (and everywhere
else). Unless there is a very good reason not to.
```suggestion
sbyte JmsMsgType { get; }
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services