You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/01/22 20:29:08 UTC

[GitHub] [activemq-nms-api] michaelpearce-gain opened a new pull request #12: NMS 2.0 WIP

michaelpearce-gain opened a new pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12
 
 
   Adding JMS 2.0 Api methods to NMS - WIP

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371030573
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                void Send(IMessage message, CompletionListener completionListener);
 
 Review comment:
   its to keep in it inline with JMS API, i added additional .net way of async methods as you've seen as addition to the JMS methods.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r403681486
 
 

 ##########
 File path: src/nms-api/NMSConnectionFactory.cs
 ##########
 @@ -1,440 +1,460 @@
-/*
 
 Review comment:
   not sure either, cant seem to fix it either. contents are same, just extra methods for context

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelpearce-gain edited a comment on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelpearce-gain edited a comment on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-577371806
 
 
   @HavretGC - start of migration of the JMS 2.0 methods to NMS , as you see this means you then get ability to have shared and shared durable consumers, which depending on broker security will allow a consumer to create those dynamically / remove need for fqqn queue consumer work arounds. 
   
   Will need to add still JMSContext, JMSProducer, JMSConsumer apis also to align fully to JMS 2.0

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371030616
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
+	        ///
+		/// A message's delivery time is the earliest time when a JMS provider may
+	        /// deliver the message to a consumer. The provider must not deliver messages
+	        /// before the delivery time has been reached.
+		/// <summary>
+		DateTime NMSDeliveryTime { get; set; }
 	}
 
 Review comment:
   if we want to add / change that, think we should do that on 1.x first, as separate PR as that's short comings on the current 1.x api.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce closed pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce closed pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371026800
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
 
 Review comment:
   There is no need to pass `Type` here. We're just returning a message despite the type.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029393
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
+
+		T ReceiveBodyNoWait<T>();
+		
+		
+		/// <summary>
+		/// An asynchronous listener which can be used to consume messages asynchronously
+		/// </summary>
+		event MessageListener Listener;
+
+		/// <summary>
+		/// Closes the message consumer.
+		/// </summary>
+		/// <remarks>
+		/// Clients should close message consumers them when they are not needed.
+		/// This call blocks until a receive or message listener in progress has completed.
 
 Review comment:
   its copy paste job from 1.x 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371027001
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
+
+		T ReceiveBodyNoWait<T>();
+		
+		
+		/// <summary>
+		/// An asynchronous listener which can be used to consume messages asynchronously
+		/// </summary>
+		event MessageListener Listener;
+
+		/// <summary>
+		/// Closes the message consumer.
+		/// </summary>
+		/// <remarks>
+		/// Clients should close message consumers them when they are not needed.
+		/// This call blocks until a receive or message listener in progress has completed.
 
 Review comment:
   Clients should close message consumers ~~them~~ when they are not needed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371026312
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
 
 Review comment:
   Redundant import. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r403681486
 
 

 ##########
 File path: src/nms-api/NMSConnectionFactory.cs
 ##########
 @@ -1,440 +1,460 @@
-/*
 
 Review comment:
   not sure either, cant seem to fix it either. contents are same, just extra methods for context, i think this is just github rendering issues, using inbuilt git diff in tooling shows just the change
   
   ![image](https://user-images.githubusercontent.com/1387822/78472438-b0689180-7730-11ea-8cc9-d6d37960cc1f.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029238
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
+	        ///
+		/// A message's delivery time is the earliest time when a JMS provider may
+	        /// deliver the message to a consumer. The provider must not deliver messages
+	        /// before the delivery time has been reached.
+		/// <summary>
+		DateTime NMSDeliveryTime { get; set; }
 	}
 
 Review comment:
   re properties, my understanding is that in NMS, it was done so those methods are on the primitive map, e.g. you'd GetProperties, and then perform those methods, it was like that in NMS 1.x its not something changed in NMS 2.0.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371027093
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
+
+		T ReceiveBodyNoWait<T>();
+		
+		
+		/// <summary>
+		/// An asynchronous listener which can be used to consume messages asynchronously
+		/// </summary>
+		event MessageListener Listener;
+
+		/// <summary>
+		/// Closes the message consumer.
+		/// </summary>
+		/// <remarks>
+		/// Clients should close message consumers them when they are not needed.
+		/// This call blocks until a receive or message listener in progress has completed.
+		/// A blocked message consumer receive call returns null when this message consumer is closed.
+		/// </remarks>
+		void Close();
+
+		/// <summary>
+		/// A Delegate that is called each time a Message is dispatched to allow the client to do
+		/// any necessary transformations on the received message before it is delivered.
+		/// </summary>
+		ConsumerTransformerDelegate ConsumerTransformer { get; set; }
 
 Review comment:
   `ConsumerTransformer` is not defined in JMS. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029353
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                void Send(IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the default destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination
+                /// </summary>
+                void Send(IDestination destination, IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
+
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                Task SendAsync(IMessage message);
+
+                /// <summary>
+                /// Sends the message to the default destination with the explicit QoS configuration
+                /// </summary>
+                Task SendAsync(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
+
+                /// <summary>
+                /// Sends the message to the given destination
+                /// </summary>
+                Task SendAsync(IDestination destination, IMessage message);
+
+                /// <summary>
+                /// Sends the message to the given destination with the explicit QoS configuration
+                /// </summary>
+                Task SendAsync(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
 Review comment:
   yes, we will have to, i think that's fine, before we merge this, we should make a 1.x branch for any maintenance needs on the older 1.x 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029142
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
 
 Review comment:
   yes formatting will be sorted, just primarily this is initial review over. I asked Anton to check against specs

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371024017
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
 
 Review comment:
   Please fix formatting here. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] HavretGC edited a comment on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
HavretGC edited a comment on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-578047073
 
 
   Quite a lot of new APIs, I will take a look at it over the weekend. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelpearce-gain edited a comment on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelpearce-gain edited a comment on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-577371806
 
 
   @HavretGC - start of migration of the JMS 2.0 methods to NMS (and additional message property for message delay), as you see this means you then get ability to have shared and shared durable consumers, which depending on broker security will allow a consumer to create those dynamically / remove need for fqqn queue consumer work arounds. 
   
   Will need to add still JMSContext, JMSProducer, JMSConsumer apis also to align fully to JMS 2.0

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-609397554
 
 
   i've replaced this with a squashed commit and seperate PR https://github.com/apache/activemq-nms-api/pull/14, and also with some of the bits @Havret you raised. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029393
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
+
+		T ReceiveBodyNoWait<T>();
+		
+		
+		/// <summary>
+		/// An asynchronous listener which can be used to consume messages asynchronously
+		/// </summary>
+		event MessageListener Listener;
+
+		/// <summary>
+		/// Closes the message consumer.
+		/// </summary>
+		/// <remarks>
+		/// Clients should close message consumers them when they are not needed.
+		/// This call blocks until a receive or message listener in progress has completed.
 
 Review comment:
   its copy paste job from 1.x, i think in general need to sort out all comments

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371025894
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                void Send(IMessage message, CompletionListener completionListener);
 
 Review comment:
   As a .NET developer, I find it a bit odd to see an asynchronous API designed with callbacks. I know that's the only way to do it in Java, but in my humble opinion, we should leverage what language has to offer. I don't have a strong opinion here though. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371025648
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                void Send(IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the default destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination
+                /// </summary>
+                void Send(IDestination destination, IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
+
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                Task SendAsync(IMessage message);
+
+                /// <summary>
+                /// Sends the message to the default destination with the explicit QoS configuration
+                /// </summary>
+                Task SendAsync(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
+
+                /// <summary>
+                /// Sends the message to the given destination
+                /// </summary>
+                Task SendAsync(IDestination destination, IMessage message);
+
+                /// <summary>
+                /// Sends the message to the given destination with the explicit QoS configuration
+                /// </summary>
+                Task SendAsync(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
 Review comment:
   In order to support Asynchronous API in that way we need to drop support for net35, as TPL (Task Parallel Library) was introduced in net40. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371982327
 
 

 ##########
 File path: src/nms-api/INMSContext.cs
 ##########
 @@ -0,0 +1,274 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+
+namespace Apache.NMS
+{
+
+	/// <summary>
+	/// A INMSContext is the main interface in the simplified NMS API
+	/// introduced for NMS 2.0. This combines in a single object the functionality of
+	/// two separate objects from the NMS 1.x API: an IConnection and an ISession.
+	///
+	/// This is comparable to JMS 2.0 API that extended JMS 1.x API
+	/// </summary>
+	public interface INMSContext : IDisposable, IStartable, IStoppable
+	{
+
+		INMSContext CreateContext(AcknowledgementMode acknowledgementMode);
+		
+		/// <summary>
+		/// Creates a producer of messages
+		/// </summary>
+		INMSProducer CreateProducer();
+		
+		
+		/// <summary>
+		/// Creates a consumer of messages on a given destination
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination);
+
+		/// <summary>
+		/// Creates a consumer of messages on a given destination with a selector
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination, string selector);
+
+		/// <summary>
+		/// Creates a consumer of messages on a given destination with a selector
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination, string selector, bool noLocal);
+
+		INMSConsumer CreateDurableConsumer(ITopic destination, string name);
+
+		INMSConsumer CreateDurableConsumer(ITopic destination, string name, string selector);
+
+        /// <summary>
+        /// Creates a named durable consumer of messages on a given destination with a selector
+        /// </summary>
+        INMSConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal);
+
+        INMSConsumer CreateSharedConsumer(ITopic destination, string name);
+
+        INMSConsumer CreateSharedConsumer(ITopic destination, string name, string selector);
+
+        INMSConsumer CreateSharedDurableConsumer(ITopic destination, string name);
+
+        INMSConsumer CreateSharedDurableConsumer(ITopic destination, string name, string selector);
+
+
+
+        void Unsubscribe(string name);
+
+		/// <summary>
+		/// Creates a QueueBrowser object to peek at the messages on the specified queue.
+		/// </summary>
+		/// <param name="queue">
+		/// A <see cref="IQueue"/>
+		/// </param>
+		/// <returns>
+		/// A <see cref="IQueueBrowser"/>
+		/// </returns>
+		/// <exception cref="System.NotSupportedException">
+		/// If the Prodiver does not support creation of Queue Browsers.
+		/// </exception>
+		IQueueBrowser CreateBrowser(IQueue queue);
+
+		/// <summary>
+		/// Creates a QueueBrowser object to peek at the messages on the specified queue
+		/// using a message selector.
+		/// </summary>
+		/// <param name="queue">
+		/// A <see cref="IQueue"/>
+		/// </param>
+		/// <param name="selector">
+		/// A <see cref="System.String"/>
+		/// </param>
+		/// <returns>
+		/// A <see cref="IQueueBrowser"/>
+		/// </returns>
+		/// <exception cref="System.NotSupportedException">
+		/// If the Prodiver does not support creation of Queue Browsers.
+		/// </exception>
+		IQueueBrowser CreateBrowser(IQueue queue, string selector);
+
+		/// <summary>
+		/// Returns the queue for the given name
+		/// </summary>
+		IQueue GetQueue(string name);
+
+		/// <summary>
+		/// Returns the topic for the given name
+		/// </summary>
+		ITopic GetTopic(string name);
+
+		/// <summary>
+		/// Creates a temporary queue
+		/// </summary>
+		ITemporaryQueue CreateTemporaryQueue();
+
+		/// <summary>
+		/// Creates a temporary topic
+		/// </summary>
+		ITemporaryTopic CreateTemporaryTopic();
+
+		/// <summary>
+		/// Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
+		/// </summary>
+		void DeleteDestination(IDestination destination);
 
 Review comment:
   I don't see this method in JMSContext. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371987388
 
 

 ##########
 File path: src/nms-api/NMSConnectionFactory.cs
 ##########
 @@ -1,440 +1,460 @@
-/*
 
 Review comment:
   I'm not sure what happened here, but the whole file seems to be recreated. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371026647
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
 
 Review comment:
   No need to specify the fully-qualified name for `TimeSpan`. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371026812
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
 
 Review comment:
   No need to specify the fully-qualified name for TimeSpan.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371025533
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
+                /// Sends the message to the default destination for this producer
+                /// </summary>
+                void Send(IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the default destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination
+                /// </summary>
+                void Send(IDestination destination, IMessage message, CompletionListener completionListener);
+
+                /// <summary>
+                /// Sends the message to the given destination with the explicit QoS configuration
+                /// </summary>
+                void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive, CompletionListener completionListener);
+
 
 Review comment:
   Redundant empty line. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371024909
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
+	        ///
+		/// A message's delivery time is the earliest time when a JMS provider may
+	        /// deliver the message to a consumer. The provider must not deliver messages
+	        /// before the delivery time has been reached.
+		/// <summary>
+		DateTime NMSDeliveryTime { get; set; }
 	}
 
 Review comment:
   There are still a few properties and methods from the original jms api missing:
   
   ```
   byte[] NMSCorrelationIDAsBytes { get; set; }
   DateTime NMSExpiration { get; set; }
   T GetBody<T>();
   bool IsBodyAssignableTo<T>();
   ```
   
   I'm sure why in NMS API we have Properties property (non pun intended) whereas in JMS there is direct access to fields from message interface, like 
   
   ```
   byte getByteProperty(String name) throws JMSException;
   short getShortProperty(String name) throws JMSException;
   int getIntProperty(String name) throws JMSException;
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelpearce-gain commented on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelpearce-gain commented on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-577371806
 
 
   @HavretGC - start of migration of the JMS 2.0 methods to NMS , as you see this means you then get ability to have shared and shared durable consumers, which depending on broker security will allow a consumer to create those dynamically / remove need for fqqn

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] HavretGC commented on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
HavretGC commented on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-578047073
 
 
   Quite a lot of new APIs, I will take a look over the weekend. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371026333
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
 
 Review comment:
   Empty space. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371024979
 
 

 ##########
 File path: src/nms-api/IMessageProducer.cs
 ##########
 @@ -54,6 +58,48 @@ public interface IMessageProducer : System.IDisposable
 		/// </summary>
 		void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive);
 
+                /// <summary>
 
 Review comment:
   Please adjust formatting.
   
   ![image](https://user-images.githubusercontent.com/9103861/73140826-78343b00-407d-11ea-9af2-1cc2193ae79b.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371981265
 
 

 ##########
 File path: src/nms-api/INMSContext.cs
 ##########
 @@ -0,0 +1,274 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+
+namespace Apache.NMS
+{
+
+	/// <summary>
+	/// A INMSContext is the main interface in the simplified NMS API
+	/// introduced for NMS 2.0. This combines in a single object the functionality of
+	/// two separate objects from the NMS 1.x API: an IConnection and an ISession.
+	///
+	/// This is comparable to JMS 2.0 API that extended JMS 1.x API
+	/// </summary>
+	public interface INMSContext : IDisposable, IStartable, IStoppable
+	{
+
+		INMSContext CreateContext(AcknowledgementMode acknowledgementMode);
+		
+		/// <summary>
+		/// Creates a producer of messages
+		/// </summary>
+		INMSProducer CreateProducer();
+		
+		
+		/// <summary>
+		/// Creates a consumer of messages on a given destination
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination);
+
+		/// <summary>
+		/// Creates a consumer of messages on a given destination with a selector
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination, string selector);
+
+		/// <summary>
+		/// Creates a consumer of messages on a given destination with a selector
+		/// </summary>
+		INMSConsumer CreateConsumer(IDestination destination, string selector, bool noLocal);
+
+		INMSConsumer CreateDurableConsumer(ITopic destination, string name);
+
+		INMSConsumer CreateDurableConsumer(ITopic destination, string name, string selector);
+
+        /// <summary>
+        /// Creates a named durable consumer of messages on a given destination with a selector
+        /// </summary>
+        INMSConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal);
+
+        INMSConsumer CreateSharedConsumer(ITopic destination, string name);
 
 Review comment:
   In Jms `name` is more explicit. It's `sharedSubscriptionName` there. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371030616
 
 

 ##########
 File path: src/nms-api/IMessage.cs
 ##########
 @@ -100,5 +100,18 @@ public interface IMessage
 		/// The type name of this message.
 		/// </summary>
 		string NMSType { get; set; }
+		
+		/// <summary>
+		/// When a message is sent, the NMSDeliveryTime header field is
+	        /// left unassigned. After completion of the send or
+	        /// publish method, it holds the delivery time of the message.
+	        /// This is the the difference, measured in milliseconds, 
+                /// between the delivery time and midnight, January 1, 1970 UTC.
+	        ///
+		/// A message's delivery time is the earliest time when a JMS provider may
+	        /// deliver the message to a consumer. The provider must not deliver messages
+	        /// before the delivery time has been reached.
+		/// <summary>
+		DateTime NMSDeliveryTime { get; set; }
 	}
 
 Review comment:
   if we want to add / change that, think we should do that on 1.x first, as separate PR as that's short comings on the current 1.x api. (e.g. add them to 1.8.x and then do a quick release spin, to add them) 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371029487
 
 

 ##########
 File path: src/nms-api/INMSConsumer.cs
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Threading.Tasks;
+
+namespace Apache.NMS
+{
+
+
+
+	/// <summary>
+	/// An object capable of sending messages to some destination
+	/// </summary>
+	public interface INMSConsumer : System.IDisposable
+	{
+
+		string MessageSelector { get; }
+
+		/// <summary>
+		/// Waits until a message is available and returns it
+		/// </summary>
+		IMessage Receive();
+
+		/// <summary>
+		/// If a message is available within the timeout duration it is returned otherwise this method returns null
+		/// </summary>
+		IMessage Receive(System.TimeSpan timeout);
+
+		/// <summary>
+		/// Receives the next message if one is immediately available for delivery on the client side
+		/// otherwise this method returns null. It is never an error for this method to return null, the
+		/// time of Message availability varies so your client cannot rely on this method to receive a
+		/// message immediately after one has been sent.
+		/// </summary>
+		IMessage ReceiveNoWait(Type t);
+
+
+		T ReceiveBody<T>();
+		
+		T ReceiveBody<T>(System.TimeSpan timeout);
+
+		T ReceiveBodyNoWait<T>();
+		
+		
+		/// <summary>
+		/// An asynchronous listener which can be used to consume messages asynchronously
+		/// </summary>
+		event MessageListener Listener;
+
+		/// <summary>
+		/// Closes the message consumer.
+		/// </summary>
+		/// <remarks>
+		/// Clients should close message consumers them when they are not needed.
+		/// This call blocks until a receive or message listener in progress has completed.
+		/// A blocked message consumer receive call returns null when this message consumer is closed.
+		/// </remarks>
+		void Close();
+
+		/// <summary>
+		/// A Delegate that is called each time a Message is dispatched to allow the client to do
+		/// any necessary transformations on the received message before it is delivered.
+		/// </summary>
+		ConsumerTransformerDelegate ConsumerTransformer { get; set; }
 
 Review comment:
   no its not, but like in IMessageConsumer its not in the MessageConsumer JMS equiv, its a trait of .net variant that has existed, that bringing along

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-nms-api] Havret commented on issue #12: NMS 2.0 WIP

Posted by GitBox <gi...@apache.org>.
Havret commented on issue #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#issuecomment-579396994
 
 
   On the whole it's looking 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:
users@infra.apache.org


With regards,
Apache Git Services