Interface AckRequestOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    AckRequest, AckRequest.Builder

    public interface AckRequestOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      String getBreakpoint()
      Breakpoint is a field to be used as an auxiliar field for some specific use cases.
      com.google.protobuf.ByteString getBreakpointBytes()
      Breakpoint is a field to be used as an auxiliar field for some specific use cases.
      String getId()
      ID of the message
      com.google.protobuf.ByteString getIdBytes()
      ID of the message
      long getLockMs()
      Time in milliseconds to lock a message before returning it to the queue.
      String getQueue()
      Queue where this message is stored
      com.google.protobuf.ByteString getQueueBytes()
      Queue where this message is stored
      String getReason()
      Reason of this result.
      com.google.protobuf.ByteString getReasonBytes()
      Reason of this result.
      boolean getRemoveMessage()
      Whether the message should be removed when acked/nacked
      double getScore()
      Sets the score of the message when ACKed, to override the default score algorithm.
      double getScoreSubtract()
      Deprecated.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getId

        String getId()
         ID of the message
         
        string id = 1;
        Returns:
        The id.
      • getIdBytes

        com.google.protobuf.ByteString getIdBytes()
         ID of the message
         
        string id = 1;
        Returns:
        The bytes for id.
      • getQueue

        String getQueue()
         Queue where this message is stored
         
        string queue = 2;
        Returns:
        The queue.
      • getQueueBytes

        com.google.protobuf.ByteString getQueueBytes()
         Queue where this message is stored
         
        string queue = 2;
        Returns:
        The bytes for queue.
      • getReason

        String getReason()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Returns:
        The reason.
      • getReasonBytes

        com.google.protobuf.ByteString getReasonBytes()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Returns:
        The bytes for reason.
      • getScoreSubtract

        @Deprecated
        double getScoreSubtract()
        Deprecated.
         This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field.
         
         The value to subtract the score and increase final message priority.
         For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm.
         If you want to penalize the message you can send a negative number.
         
         IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue.
         
         This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue).
         It will be ignored if used at the same time of 'score' or 'lock_ms' fields.
         
        double score_subtract = 3 [deprecated = true];
        Returns:
        The scoreSubtract.
      • getBreakpoint

        String getBreakpoint()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Returns:
        The breakpoint.
      • getBreakpointBytes

        com.google.protobuf.ByteString getBreakpointBytes()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Returns:
        The bytes for breakpoint.
      • getLockMs

        long getLockMs()
         Time in milliseconds to lock a message before returning it to the queue.
         For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field.
         For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field.
         IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds.
         This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well.
         
        int64 lock_ms = 6;
        Returns:
        The lockMs.
      • getRemoveMessage

        boolean getRemoveMessage()
         Whether the message should be removed when acked/nacked
         
        bool removeMessage = 7;
        Returns:
        The removeMessage.
      • getScore

        double getScore()
         Sets the score of the message when ACKed, to override the default score algorithm.
         If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score.
         For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds.
         For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0.
         Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request.
         REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped.
         
        double score = 10;
        Returns:
        The score.