I know that we implement back-pressure in Zeebe as it is also mentioned in the docs. Now I searched for some mechanics in the current Java Client but did not find any. Is it
The user code makes requests at a rate that is higher than what the client library can send the requests at
Then this is influenced by the zeebe.client.maxRequests configuration parameter you linked. Up to that number, the user code can submit asynchronous requests (via #executeAsync). If all these requests are in-flight and the user makes another request, then the #executeAsync blocks for up to 15 seconds (or more specifically the time that is configured via this parameter https://github.com/zeebe-io/zeebe/blob/master/client-java/src/main/java/io/zeebe/client/ClientProperties.java#L36) until one of the other response futures has been resolved and accessed by user code.
I wrote Zeebe 0.8.0 above, because we are quite certain we will change this in the future such that #executeAsync never blocks.
Does that make sense or are you thinking of another scenario?
Thanks! I actually also thought about the Jobs/WorkItems/Tasks streamed into the client, this rate definitely also needs to be controlled, so that the broker does not send more jobs than the client could handle respectively distributes them correctly among multiple clients. How does this work?
Thanks a lot - that answers my question and I was indeed to stupid to find this method (and I looked at the susbcrription builder). Sorry! Probably “back-pressure” should be a keyword mentioned in the Javadocs?