public final class MessageHandlerOptions extends Object
Constructor and Description |
---|
MessageHandlerOptions()
Default constructor for create
MessageHandlerOptions with default settings. |
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 . |
Modifier and Type | Method and Description |
---|---|
Duration |
getMaxAutoRenewDuration()
Gets the maximum duration within which the lock will be renewed automatically.
|
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.
|
boolean |
isAutoComplete()
Whether the auto complete is set to true.
|
String |
toString() |
public MessageHandlerOptions()
MessageHandlerOptions
with default settings.
getMaxConcurrentCalls()
default value is 1.
getMaxAutoRenewDuration()
default value is 5 minutes.
isAutoComplete()
default is true.public MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration)
MessageHandlerOptions
.maxConcurrentCalls
- maximum number of concurrent calls to the onMessage handlerautoComplete
- true if the pump should automatically complete message after onMessageHandler action is completed. false otherwise.maxAutoRenewDuration
- - Maximum duration within which the client keeps renewing the message lock if the processing of the message is not completed by the handler.public MessageHandlerOptions(int maxConcurrentCalls, boolean autoComplete, Duration maxAutoRenewDuration, Duration messageWaitDuration)
MessageHandlerOptions
.maxConcurrentCalls
- maximum number of concurrent calls to the onMessage handlerautoComplete
- true if the pump should automatically complete message after onMessageHandler action is completed. false otherwise.maxAutoRenewDuration
- - Maximum duration within which the client keeps renewing the message lock if the processing of the message is not completed by the handler.messageWaitDuration
- duration to wait for receiving the messagepublic boolean isAutoComplete()
public int getMaxConcurrentCalls()
public Duration getMaxAutoRenewDuration()
public Duration getMessageWaitDuration()
Copyright © 2018. All rights reserved.