Azure / Azure/azure-service-bus-java

significance of messageWaitDuration in MessageHandlerOptions

Open
#229 12 comments 0 reactions 0 assignees View on GitHub
BreakingChange documentation
Dominant language
Java
Stars
62
Forks
63
PR merge metrics
No merged PRs in 30d

Description

i am trying to register my message Hander for azure servicebus and i see the following description about one of the constructors of messageHandlerOptions class:-
**maxConcurrentCalls** maximum number of concurrent calls to the onMessage handler
**autoComplete** 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 message

Assuming i have a pile up of messages in my queue and i switch on my listener code,
this is what i understand will happen :
1) maxConcurrentCalls is basically the number of messages that will be picked or basically the number of threads that are gonna get spawned to make sure to read the messages from the queue.
2) autoComplete : what do we mean by pump here?? this is basically the ack that we send either auto or manual. but what do we mean by pump in this messaging context?
3) maxAutoRenewDuration: this is the time period within which the consumer has to send ACK to servicebus else the lock will be released and other consumers will get the message. rt??
4) messageWaitDuration: what is this for??? i was playing around with this and it looks like the longpoll timeout value?? is this correct?? what are the implications if i keep this value to a high value like Duration.ofDays(10) and what if i keep this very low i.e. Duration.ofSeonds(10)??

Also, As i understand for the standard tier, the pricing is based on the number of operations performed. So if i keep the Duration a long value lets say some days so does that mean that the number of operations are gonna be less when compared to a lesser value of duration???

I might be completely off the grid here so if you can please help me understand the significance of messageWaitDuration param, and what are the outcomes if i keep this value in days vs keeping this value short like seconds or minutes. Also as i need to take the pricing into account as well, can you also clarify that this param does or doesnt add up in the number of operations in backgroud thus resulting in cost??

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.