Versions Compared

Key

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

Version 1516.5 0 introduces the new queue type (D)elay. Delay processing is a workflow where specific messages being dequeued cannot yet be processed, and should be retried later. However, other messages within the queue can be processed and should not be blocked.

...

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));
} 	

...

  • #Reprocess’ - the reprocess counter displays the number of times a message has been put into the delayed state.

  • Reprocess Date/Time’ - the date/time when the message will be revert reverted back to a queued state.

You can also use the queue type drop-down within the queue to filter for delayed messages.

...