@ DoesServiceRequest public void addMessage ( final CloudQueueMessage message , final int timeToLiveInSeconds , final int initialVisibilityDelayInSeconds , QueueRequestOptions options , OperationContext opContext ) throws StorageException { Utility . assertNotNull ( "message" , message ) ; Utility . assertNotNull ( "messageContent" , message . getMessageContentAsByte ( ) ) ; Utility . assertInBounds ( "timeToLiveInSeconds" , timeToLiveInSeconds , 0 , QueueConstants . MAX_TIME_TO_LIVE_IN_SECONDS ) ; final int realTimeToLiveInSeconds = timeToLiveInSeconds == 0 ? QueueConstants . MAX_TIME_TO_LIVE_IN_SECONDS : timeToLiveInSeconds ; Utility . assertInBounds ( "initialVisibilityDelayInSeconds" , initialVisibilityDelayInSeconds , 0 , realTimeToLiveInSeconds - 1 ) ; if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this . queueServiceClient ) ; ExecutionEngine . executeWithRetry ( this . queueServiceClient , this , this . addMessageImpl ( message , realTimeToLiveInSeconds , initialVisibilityDelayInSeconds , options ) , options . getRetryPolicyFactory ( ) , opContext ) ; }
Adds a message to the back of the queue with the specified options .