Class ResequenceMessageStore

    • Constructor Detail

      • ResequenceMessageStore

        public ResequenceMessageStore()
    • Method Detail

      • removeMessageStatement

        protected List<Statement> removeMessageStatement​(String msgId)

        Remove message statement.

        When re-sequenced we need to maintain the last processed id along with the removal. So that at an event the node crashes we know where to start from.

        Statement to remove the message once a response is received.

        Overrides:
        removeMessageStatement in class JDBCMessageStore
        Parameters:
        msgId - message id of the statement which should be removed.
        Returns:
        the sql remove message statement.
      • getStoreMessageStatement

        protected Statement getStoreMessageStatement​(MessageContext context,
                                                     Long sequenceId)
                                              throws StoreException

        Stores message in database by providing the correct sequence id.

        Generates the statement to store message in database.

        If the sequence id is specified the corresponding sequence id will be stored, sequence id will be specified if re-sequence message store is being used. In other times this value will be null.

        Overrides:
        getStoreMessageStatement in class JDBCMessageStore
        Parameters:
        context - the content of the message.
        sequenceId - the sequence id of the message (optional).
        Returns:
        SQL statement for insertion of value to store.
        Throws:
        StoreException - at an event there's an exception when generating the statement.
        See Also:
        ResequenceMessageStore