Interface InboundProcessor

All Known Implementing Classes:
AbstractInboundProcessor, BaseInboundFixLenProcessor

public interface InboundProcessor
Interface for processing inbound Messages. Default implementations are provided by the Platform, for example the "Default Model CSV Processor". Additional custom implementations can be provided and associated with inbound queues via setting a custom processor on your inbound interface in studio.
  • Method Details

    • process

      TaskResult process​(Message message, GridTaskContext gridTaskContext, PlatformUserContext context) throws java.lang.Exception
      Callback from the message queue framework to process an inbound message.
      Parameters:
      message - Message which needs to be processed
      gridTaskContext - GridTaskContext provides information about the grid task associated with the message
      context - value chain admin context for the queue's parent value chain
      Returns:
      TaskResult indicates whether processing succeeded or failed, and whether to retry
      Throws:
      java.lang.Exception
    • handleResults

      void handleResults​(TaskResult taskResult, Message message, PlatformUserContext context) throws java.lang.Exception
      After processing, handles success and error cases, typically by enqueueing a response message.

      The general contract for Platform's supported processors is:
      If TaskResult is SUCCEED and there are no upload errors, empty success message will be enqueued to success queue If TaskResult is SUCCEED or FAILD and there are upload errors (.results file is not empty), error message will be enqueued to error queue with payloadRef pointing to error file For scenarios where extra handling is required on errors before enqueueing, override this method in the implementation class

      Parameters:
      taskResult - TaskResult task result from process(Message, GridTaskContext, PlatformUserContext)
      message - Processed Message
      context - value chain admin context for the queue's parent value chain
      Throws:
      java.lang.Exception