Class GetMessagesRequest


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20210201")
    public class GetMessagesRequest
    extends BmcRequest<Void>

    Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.63.0/queue/GetMessagesExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetMessagesRequest.

    • Constructor Detail

      • GetMessagesRequest

        public GetMessagesRequest()
    • Method Detail

      • getQueueId

        public String getQueueId()
        The unique queue identifier.
      • getVisibilityInSeconds

        public Integer getVisibilityInSeconds()
        If the visibilityInSeconds parameter is set, messages will be hidden for visibilityInSeconds seconds and won’t be consumable by other consumers during that time.

        If it isn’t set it defaults to the value set at the queue level.

        Using a visibilityInSeconds value of 0 effectively acts as a peek functionality. Messages retrieved that way aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one.

      • getTimeoutInSeconds

        public Integer getTimeoutInSeconds()
        If the timeoutInSeconds parameter isn’t set or it is set to a value greater than 0, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after timeoutInSeconds seconds (in which case it will return an empty response), whichever comes first.

        If the parameter is set to 0, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not. In same rare-cases a long-polling request could be interrupted (returned with empty response) before the end of the timeout.

      • getLimit

        public Integer getLimit()
        The limit parameter controls how many messages is returned at-most.
      • getOpcRequestId

        public String getOpcRequestId()
        Unique Oracle-assigned identifier for the request.

        If you need to contact Oracle about a particular request, please provide the request ID.

      • getChannelFilter

        public String getChannelFilter()
        Optional parameter to filter the channels.
      • builder

        public static GetMessagesRequest.Builder builder()
        Return a new builder for this request object.
        Returns:
        builder for the request object
      • equals

        public boolean equals​(Object o)
        Description copied from class: BmcRequest
        Uses getInvocationCallback and getRetryConfiguration to determine if passed request is equal to ‘this’.
        Overrides:
        equals in class BmcRequest<Void>
      • hashCode

        public int hashCode()
        Description copied from class: BmcRequest
        Uses getInvocationCallback and getRetryConfiguration to generate a hash.
        Overrides:
        hashCode in class BmcRequest<Void>