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 2021/01/07 12:05:13 UTC

[GitHub] [activemq-nms-api] lcygan-gain opened a new pull request #17: More async methods added

lcygan-gain opened a new pull request #17:
URL: https://github.com/apache/activemq-nms-api/pull/17


   Work In Progress


----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce closed pull request #17: More async methods added

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


   


----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] Havret commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/IConnection.cs
##########
@@ -95,16 +96,22 @@ public interface IConnection : IDisposable, IStartable, IStoppable
         /// </summary>
         ISession CreateSession();
 
+        Task<ISession> CreateSessionAsync();

Review comment:
       It would be wise to have a CancellationToken as a parameter to all `*Async` 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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/ISession.cs
##########
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Threading.Tasks;

Review comment:
       What about CreateMessage do we want async varients on these? This is API remember. I know for AMQP its probably super fast to return and that is what we are going to implement in first, as its all done within the process, but in some other protocols hilariously to create a message a remote call is made (yeah! its shocking but the old protocols are old for a reason!), e.g. so if someone wanted to update the NMS EMS library for example....




----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/ISession.cs
##########
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Threading.Tasks;

Review comment:
       What about CreateMessage do we want async varients on these? I know for AMQP its probably super fast to return as its all done within the process, but in some other protocols hilariously to create a message a remote call is made (yeah! its shocking but the old protocols are old for a reason!)




----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/ISession.cs
##########
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Threading.Tasks;

Review comment:
       should we have a CreateQueueAsync and CreateTopicAsync (for same reason above)




----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/ISession.cs
##########
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Threading.Tasks;

Review comment:
       CreateQueue and CreateTopic (for same reason above)




----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/NMSConnectionFactory.cs
##########
@@ -424,6 +425,36 @@ public INMSContext CreateContext(string userName, string password, Acknowledgeme
             return this.factory.CreateContext(userName, password, acknowledgementMode);
         }
 
+        public Task<IConnection> CreateConnectionAsync()
+        {
+            return this.factory.CreateConnectionAsync();
+        }
+
+        public Task<IConnection> CreateConnectionAsync(string userName, string password)
+        {
+            return this.factory.CreateConnectionAsync(userName, password);
+        }
+
+        public Task<INMSContext> CreateContextAsync()
+        {
+            return this.factory.CreateContextAsync();
+        }
+
+        public Task<INMSContext> CreateContextAsync(AcknowledgementMode acknowledgementMode)
+        {
+            return this.factory.CreateContextAsync(acknowledgementMode);
+        }
+
+        public Task<INMSContext> CreateContextAsync(string userName, string password)
+        {
+            return this.factory.CreateContextAsync(userName, password);
+        }
+
+        public Task<INMSContext> CreateContextAsync(string userName, string password, AcknowledgementMode acknowledgementMode)

Review comment:
       What about INMSProducer and INMSConsumer interfaces?




----------------------------------------------------------------
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



[GitHub] [activemq-nms-api] michaelandrepearce commented on a change in pull request #17: More async methods added

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



##########
File path: src/nms-api/ISession.cs
##########
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Threading.Tasks;

Review comment:
       What about CreateMessage do we want async varients on these? I know for AMQP its probably super fast to return and that is what we are going to implement in first, as its all done within the process, but in some other protocols hilariously to create a message a remote call is made (yeah! its shocking but the old protocols are old for a reason!), e.g. so if someone wanted to update the NMS EMS library for example....




----------------------------------------------------------------
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