Created
June 16, 2011 05:57
-
-
Save abdullin/1028754 to your computer and use it in GitHub Desktop.
Documented version of IEnvelopeQuarantine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Implements quarantine logic for the specific message handler. Default implementation | |
/// is <see cref="MemoryQuarantine"/> | |
/// </summary> | |
public interface IEnvelopeQuarantine | |
{ | |
/// <summary> | |
/// Tries to quarantine the specified envelope. Implementation can decide whether we need to give another | |
/// try to process the envelope (by returning <em>False</em>) or if quarantine should accept the envelope | |
/// completely. Then processor will discard the queue from it's incoming queue and leave it up to the | |
/// quarantine to record it, push to poison etc. | |
/// </summary> | |
/// <param name="context">The envelope transport context.</param> | |
/// <param name="ex">The exception.</param> | |
/// <returns><em>True</em> if envelope should be quarantined right away (i.e. exception happened 4 times) | |
/// and is not excepted to be processed by the queue any more; <em>False</em> otherwise</returns> | |
bool TryToQuarantine(EnvelopeTransportContext context, Exception ex); | |
/// <summary> | |
/// Tries to release envelope record from the partial or full quarantine (I.e.: when message | |
/// has been successfully processed and quarantine can forget about it forever). | |
/// </summary> | |
/// <param name="context">The envelope transport context.</param> | |
void TryRelease(EnvelopeTransportContext context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment