Title
#users-public
c

cl

10/18/2022, 4:02 PM
Hi, I am using ILP Java client. I need to control flush data by time(30 seconds) and number of lines/messages. Are there any APIs which can tell me that number of lines already in ILP client memory ready for flush?
Alex Pelagenko

Alex Pelagenko

10/18/2022, 4:18 PM
hi, you cannot control it from client. You can set settings on the table to control it instead
4:20 PM
so set commitLag to 30s and and maxuncommittedrows to the number of lines you want to commit after
c

cl

10/18/2022, 4:21 PM
ok.. thanks.
4:45 PM
Does these conditions are "and" or "or" true for enforcement?
Alex Pelagenko

Alex Pelagenko

10/18/2022, 5:02 PM
or
c

cl

10/18/2022, 5:21 PM
great. thx a lot.
j

javier ramirez

10/19/2022, 8:37 AM
Those settings will help once the data hits the server, but your client should be flushing in order to send to the server. I have some demo code in which I just keep a counter and flush every certain number of messages https://gist.github.com/javier/ec8318968f19648be77f2034d846faec
8:37 AM
My code is not great and I was using just for a demo to simulate data coming in batches, but maybe it can help
c

cl

10/19/2022, 1:06 PM
great. Let me take a look. thx.