/// <summary> /// Applies the given UnknownJobHandling behavior. /// </summary> /// <param name="handling"> /// The UnknownJobHandling value to apply. /// </param> private void ApplyUnknownJobHandling(UnknownJobHandling handling) { switch (handling) { case UnknownJobHandling.Requeue: shouldDeleteMessage = false; break; case UnknownJobHandling.RequeueThenDeleteAfterThreshold: shouldDeleteMessage = (message.DequeueCount >= consumerSettings.UnknownJobRequeueThreshold); break; case UnknownJobHandling.Delete: shouldDeleteMessage = true; break; case UnknownJobHandling.DecidePerJob: default: throw new NotSupportedException("Unsupported UnknownJobHandling: " + handling); } requeueVisibilityTimeout = consumerSettings.UnknownJobRequeueTimeout; }
/// <summary> /// Applies the given UnknownJobHandling behavior. /// </summary> /// <param name="handling"> /// The UnknownJobHandling value to apply. /// </param> private void ApplyUnknownJobHandling(UnknownJobHandling handling) { switch (handling) { case UnknownJobHandling.Requeue: break; case UnknownJobHandling.Delete: shouldDeleteMessage = true; break; case UnknownJobHandling.DedicePerJob: default: throw new NotSupportedException("Unsupported UnknownJobHandling: " + handling); } }