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/02/11 12:29:28 UTC

[GitHub] [activemq-nms-api] Havret commented on a change in pull request #25: AMQNET-637 NMS 2.0 Add missing async message factory methods

Havret commented on a change in pull request #25:
URL: https://github.com/apache/activemq-nms-api/pull/25#discussion_r574463227



##########
File path: src/nms-api/IMessageProducer.cs
##########
@@ -117,41 +117,81 @@ public interface IMessageProducer : System.IDisposable
         /// </summary>
         IMessage CreateMessage();
 
+        /// <summary>
+        /// Creates a new message with an empty body
+        /// </summary>
+        Task<IMessage> CreateMessageAsync();

Review comment:
       What's the expectation for non async implementations? I mean, what if async implementation doesn't make sense? Are we going to throw NotSupportedException or should we return the result of the sync equivalent? If the latter, I'd encourage you to use ValueTasks instead. 




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