Class InMemoryConsumer

    • Constructor Detail

      • InMemoryConsumer

        public InMemoryConsumer​(InMemoryStore store)
    • Method Detail

      • receive

        public MessageContext receive()
        Description copied from interface: MessageConsumer
        Receives the next message from the store.
        Specified by:
        receive in interface MessageConsumer
        Returns:
        Synapse message context of the last message received from the store.
      • ack

        public boolean ack()
        Description copied from interface: MessageConsumer
        Acknowledges the last message received so that it will be removed from the store.
        Specified by:
        ack in interface MessageConsumer
        Returns:
        true if the acknowledgement is successful. false otherwise.
      • cleanup

        public boolean cleanup()
        Description copied from interface: MessageConsumer
        Cleans up this message consumer
        Specified by:
        cleanup in interface MessageConsumer
        Returns:
        true if cleanup is successful, false otherwise.
      • isAlive

        public boolean isAlive()
        Description copied from interface: MessageConsumer
        Check availability of connectivity with the message store
        Specified by:
        isAlive in interface MessageConsumer
        Returns:
        true if connection available, false otherwise.
      • setAlive

        public void setAlive​(boolean isAlive)
        Description copied from interface: MessageConsumer
        Set the connectivity state with the message store
        Specified by:
        setAlive in interface MessageConsumer
        Parameters:
        isAlive - if connection available.
      • setId

        public void setId​(int id)
        Description copied from interface: MessageConsumer
        Sets the ID of this message consumer.
        Specified by:
        setId in interface MessageConsumer
        Parameters:
        id - ID