MessageHandlerOptions Class
- java.
lang. Object - com.
microsoft. azure. servicebus. MessageHandlerOptions
- com.
public class MessageHandlerOptions
The OnMessage handler processing options.
Constructor Summary
Constructor | Description |
---|---|
MessageHandlerOptions() |
Default constructor for create MessageHandlerOptions with default settings. getMaxConcurrentCalls() default value is 1. getMaxAutoRenewDuration() default value is 5 minutes. isAutoComplete() default is true. |
MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration) |
Create a instance of MessageHandlerOptions. |
MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration, Duration messageWaitDuration) |
Create a instance of MessageHandlerOptions. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Duration |
getMaxAutoRenewDuration()
Gets the maximum duration within which the lock will be renewed automatically. This value should be greater than the longest message lock duration; for example, the LockDuration Property. |
int |
getMaxConcurrentCalls()
Gets the maximum number of concurrent calls to the callback the message pump should initiate. |
Duration |
getMessageWaitDuration()
Gets the time to wait for receiving a message. Defaults to 1 minute. |
boolean |
isAutoComplete()
Whether the auto complete is set to true. |
String | toString() |
Constructor Details
MessageHandlerOptions
public MessageHandlerOptions()
Default constructor for create MessageHandlerOptions with default settings. getMaxConcurrentCalls() default value is 1. getMaxAutoRenewDuration() default value is 5 minutes. isAutoComplete() default is true.
MessageHandlerOptions
public MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration)
Create a instance of MessageHandlerOptions.
Parameters:
MessageHandlerOptions
public MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration, Duration messageWaitDuration)
Create a instance of MessageHandlerOptions.
Parameters:
Method Details
getMaxAutoRenewDuration
public Duration getMaxAutoRenewDuration()
Gets the maximum duration within which the lock will be renewed automatically. This value should be greater than the longest message lock duration; for example, the LockDuration Property.
Returns:
getMaxConcurrentCalls
public int getMaxConcurrentCalls()
Gets the maximum number of concurrent calls to the callback the message pump should initiate.
Returns:
getMessageWaitDuration
public Duration getMessageWaitDuration()
Gets the time to wait for receiving a message. Defaults to 1 minute.
Returns:
isAutoComplete
public boolean isAutoComplete()
Whether the auto complete is set to true.
Returns:
toString
public String toString()
Applies to
Azure SDK for Java