I am developing a service that makes use of Spring for messaging and integration. The service has an inbound message channel that clients can use to send control information to the service and an outbound message channel that the service can use to send event information to interested clients.
I would like for the service to be deployable in scenarios wherein clients are in different address spaces and use a messaging technology (e.g. zeromq or AMQP) for communicating with the service and also in scenarios wherein a client resides in the same address space as the service and uses basic POJO calls to communicate with the service.
In the latter case - client and service in the same address space - it is clear enough to me how I can use something like MessagingGateway to hide the messaging infrastructure for calls from the client to the service. It is not as clear to me, however, how I would hide the messaging infrastructure from clients wishing to receive event information asynchronously from the service.
What is the preferred way of using Spring Integration to do this?