Class XClaimArgs

    • Constructor Detail

      • XClaimArgs

        public XClaimArgs()
    • Method Detail

      • idle

        public XClaimArgs idle​(Duration idle)
        Set the idle time (last time it was delivered) of the message. If IDLE is not specified, an IDLE of 0 is assumed, that is, the time count is reset because the message has now a new owner trying to process it.
        Parameters:
        idle - the idle duration, must not be null
        Returns:
        the current XClaimArgs
      • time

        public XClaimArgs time​(long time)
        This is the same as IDLE but instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds). This is useful in order to rewrite the AOF file generating XCLAIM commands.
        Parameters:
        time - the timestamp
        Returns:
        the current XClaimArgs
      • retryCount

        public XClaimArgs retryCount​(int retryCount)
        Set the retry counter to the specified value. This counter is incremented every time a message is delivered again. Normally XCLAIM does not alter this counter, which is just served to clients when the XPENDING command is called: this way clients can detect anomalies, like messages that are never processed for some reason after a big number of delivery attempts.
        Parameters:
        retryCount - the retry count, must be positive
        Returns:
        the current XClaimArgs
      • force

        public XClaimArgs force()
        Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client. However, the message must exist in the stream, otherwise the IDs of non-existing messages are ignored.
        Returns:
        the current XClaimArgs
      • justId

        public XClaimArgs justId()
        In the returned structure, only set the IDs of messages successfully claimed, without returning the actual message. Using this option means the retry counter is not incremented.
        Returns:
        the current XClaimArgs
      • lastId

        public XClaimArgs lastId​(String lastId)
        Sets the last id of the message to claim.
        Parameters:
        lastId - the last id, must not be null
        Returns:
        the current XClaimArgs