Added upstream message factory

May be we should log it after the functionCall. If something bad happens in the function call then also the logs will say that it had sent the delivery receipt.