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.
Set AsyncClientPolicy.asyncMaxCommands to limit the number of concurrent commands.
FAQ Tuning async Java Client connections
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.
AsyncClientPolicy.asyncMaxCommands denotes the number of concurrent commands that are executing via multiple threads.
So how can I limit the number of commands that are lying in the buffer i.e., limiting max number of elements in buffer.
I think I understand your question now. To clarify:
asyncMaxCommands >= <number of executing async commands> + <number of queued async commands>