Class FailureSubmissionService

java.lang.Object
org.graylog.failure.FailureSubmissionService

@Singleton public class FailureSubmissionService extends Object
A supplementary service layer, which is aimed to simplify failure submission for the calling code. Apart from the input transformation, it also encapsulates integration with the failure handling configuration.
  • Constructor Details

    • FailureSubmissionService

      @Inject public FailureSubmissionService(org.graylog.failure.FailureSubmissionQueue failureSubmissionQueue, FailureHandlingConfiguration failureHandlingConfiguration)
  • Method Details

    • submitUnknownProcessingError

      public boolean submitUnknownProcessingError(Message message, String details)
      Submits an unrecognized processing error to the failure queue. Depending on the configuration might ignore the error Must be called the last in the processing chain!
      Parameters:
      message - a problematic message
      details - error details
      Returns:
      true if the message is not filtered out
    • submitProcessingErrors

      public boolean submitProcessingErrors(Message message)
      Submits message's processing errors to the failure queue. The errors are obtained via Message.processingErrors(). Depending on the configuration might ignore the errors. Must be called the last in the processing chain!
      Parameters:
      message - a message with processing errors
      Returns:
      true if the message is not filtered out
    • submitIndexingErrors

      public void submitIndexingErrors(Collection<Messages.IndexingError> indexingErrors)
      Submits Elasticsearch indexing errors to the failure queue
      Parameters:
      indexingErrors - a collection of indexing errors