messages are moved to the error queue after X number of failed attempts.
What's the cleanest way to determine if that message exists in the error
queue?
My first implementation is to duplicate the current logic of error message
handler.
count the number of attempts per TransportMessageId. if the count is
greater than or equal to the number of retries, do something else continue
on.
when completed if exception is null or retry limit has been reached, remove
counter.
I am hoping for something simpler like
On_MessageProcessingFailure
{
var key = new MessageId
{
MessageIdentifier = ?,
SourceInstanceId = ?
};
if(exception == null) return;
if(queue.PeekById(messageId) == null) return;
using(var tx = new TransactionScope(RequiresNew))
{
bus.DelaySend(later, new MessageForMe());
tx.Complete();
}
}
However, I don't know how to construct the messageId. what are the message
and source identifiers? I also don't like how this ties me into RQ, but I
don't see a higher level abstraction between RQ and MSMQ. I'm assuming the
transport is it, which is what I currently have and it's complex. What is
required to build the MessageId object, or is this approach even possible?
--
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rhino-tools-dev/-/NNZ5ZMSJwPkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en.