add support for async execution in the apache client