Interface MessageProcessor


  • public interface MessageProcessor
    This interface can be used to take some action whenever a message is processed

    Rqueue supports many types of action that can be taken by application whenever some events occur about the enqueued tasks.

    You can set one or more message processor in factory or container. Each message processor is called based upon the status MessageStatus.

    See Also:
    SimpleRqueueListenerContainerFactory, RqueueMessageListenerContainer
    • Method Detail

      • process

        @Deprecated
        default boolean process​(java.lang.Object message)
        Deprecated.
        This method would be called with the specified object, this will happen only when message is deserialize successfully.

        Return value is used only when it's called from pre-processing, if the method returns true then only message would be consumed otherwise it will be discarded, no further processing of the message would be done.

        Parameters:
        message - message
        Returns:
        true/false.
      • process

        @Deprecated
        default boolean process​(java.lang.Object message,
                                RqueueMessage rqueueMessage)
        Deprecated.
        This method would be called with the specified object, this will happen only when message is deserialize successfully.

        Return value is used only when it's called from pre-processing, if the method returns true then only message would be consumed otherwise it will be discarded, no further processing of the message would be done.

        Parameters:
        message - message
        rqueueMessage - rqueue message object
        Returns:
        true/false.
      • process

        default boolean process​(Job job)