aaron-ai commented on code in PR #324:
URL: https://github.com/apache/rocketmq-clients/pull/324#discussion_r1057415601
##########
csharp/rocketmq-client-csharp/SimpleConsumer.cs:
##########
@@ -196,12 +196,13 @@ internal override void OnSettingsReceived(rmq.Settings
settings)
}
}
- public async Task<List<Message>> Receive(int batchSize, TimeSpan
invisibleDuration)
+ public async Task<List<Message>> Receive(int batchSize, TimeSpan
invisibleDuration, TimeSpan? awaitDuration = null)
{
var messageQueue = NextQueue();
if (null == messageQueue)
{
- Logger.Debug("NextQueue returned null");
+ Logger.Debug("NextQueue returned null, waiting for 50ms");
+ await Task.Delay(50);
Review Comment:
@colprog If the queue could not be chosen, an exception is preferred rather
than an empty message list. Exception make developers could be aware of the
unexcepted occation and it is within their discretion. On the other hand,
consumer need to do some precheck before startup, including the subscription is
set or not.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]