Generic method with consumer block