What would the best way of going about creating a consumer-producer type relationship for harvesting and using Recaptcha v2 tokens for web scraping, I have a basic chrome extension in which to harvest these tokens which are then submitted to my java application through a locally hosted web server.
The issue I have is their tokens are only valid for 110s so they would need to be invalidated after this time to make sure they are not used, I would also like consumer threads to consume a token as soon as one becomes available if they need one, any suggestions in this area would be very helpful.