@lena,
The IFunctionEndpoint
requires the FunctionContext
to send messages properly, so you’ll have to pass it into your message send service one way or another.
If you do not want to do this, you can alternatively create a Send-Only endpoint on-the-fly within your message service, but this can bring other complications. See Azure Function Hosted Send Only Endpoint. Be aware the code shown in the link is specifically for the In-Process model, not the Worker model.