Limit on number of commands we can put in AsyncClient

java

#1

Can I limit the number of commands we can put in AsyncClient. I was just worried as this is async and returns just by writing in buffer can lead to memory issue, to come up with such issues can we put some limit on the number of commands. Please help me with this :slight_smile.


#2

Set AsyncClientPolicy.asyncMaxCommands to limit the number of concurrent commands.


FAQ Tuning async Java Client connections
#3

Hey Brian,

Does this denote the number of concurrent commands that are executing via multiple threads in the system or does this denote the size of the buffer.


#4

AsyncClientPolicy.asyncMaxCommands denotes the number of concurrent commands that are executing via multiple threads.


#5

So how can I limit the number of commands that are lying in the buffer i.e., limiting max number of elements in buffer.


#6

I think I understand your question now. To clarify:

asyncMaxCommands  >= <number of executing async commands> + <number of queued async commands>