Writing a spooler in an NServiceBus Handler

Why would that not be a good use case?

Just host the handler in its own endpoint, set the max concurrency to 1 to achieve sequential message processing

Also set immediate and delayed retries to 0. You can also set the transaction mode of the transport to None

By the way, most email providers have idempotent interfaces these days meaning you can easily send the same message more than once within a certain time window. Usually you have to provide an Identifier for the service to deduplicate. You can use the message identifier for this and retrieve this in your handler:

– Ramon

1 Like