Use REST API (HTTP 1/2) for inter-process communication and in-process mock as a shortcut (in-process mock inlines RPC call);
(optional) Forbid inlining for message handlers that calls for RPC result from the same process because it leads to deadlocks;
Handle service discovery issue - target localhost, k8s or docker-compose deployments where are no need in service discovery;
.UseWebApiGateway() call should resolve in-process endpoints by incoming message headers
Common controller should handle incoming request as message handler does with some tweaks (it calls IGenericEndpoint.ExecuteMessageHandler());
ErrorHandlingMiddleware should abandon retries and return errors in RPC style (recode retries);
UnitOfWorkMiddleware shouldn't use inbox/deduplication features so as to handle all incoming requests and because queries don't produce database changes;
UnitOfWorkMiddleware should use outbox, so as to send outgoing messages, excluding reply, we should capture(extract from outbox) reply and return it in RPC style;