Interface MessageConsumer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean ack()
      Acknowledges the last message received so that it will be removed from the store.
      boolean cleanup()
      Cleans up this message consumer
      String getId()
      Returns the ID of this Message consumer.
      boolean isAlive()
      Check availability of connectivity with the message store
      MessageContext receive()
      Receives the next message from the store.
      void setAlive​(boolean isAlive)
      Set the connectivity state with the message store
      void setId​(int i)
      Sets the ID of this message consumer.
    • Method Detail

      • receive

        MessageContext receive()
        Receives the next message from the store.
        Returns:
        Synapse message context of the last message received from the store.
      • ack

        boolean ack()
        Acknowledges the last message received so that it will be removed from the store.
        Returns:
        true if the acknowledgement is successful. false otherwise.
      • cleanup

        boolean cleanup()
        Cleans up this message consumer
        Returns:
        true if cleanup is successful, false otherwise.
      • isAlive

        boolean isAlive()
        Check availability of connectivity with the message store
        Returns:
        true if connection available, false otherwise.
      • setAlive

        void setAlive​(boolean isAlive)
        Set the connectivity state with the message store
        Parameters:
        isAlive - if connection available.
      • setId

        void setId​(int i)
        Sets the ID of this message consumer.
        Parameters:
        i - ID
      • getId

        String getId()
        Returns the ID of this Message consumer.
        Returns:
        ID