Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public override async Task ProcessMessageAsync(IMessageContext context, CancellationToken token)
{
   // attempt to send message to a service
   var response = await service.Submit(context.message);
   
   if(response.NotReadyTryAgainLater)  // service indicates the message cannot be processed yet
     // Call the ReprocessMessage method passing in a timespan for when we should retry
     context.ReprocessMessage(TimeSpan.FromMinutes(5));
} 	

...