I have a dynamic/arbitrary list of integration clients who I send messages to. I use Spring Integration for processing the messaging, and started using the very-promising recently released Spring AMQP M1 for handing off these messages to RabbitMQ.
One of the requirements I have is that each client must not be able to see or interfere in anyway with the messages of other clients. Per the AMQP spec, the way to do this is by having a separate virtual host per client.
From Spring Integration message processing side, this is easy. Each message arriving to the AMQP endpoint has 3 headers: virtual host, exchange name and routing key.
The problem for me is that the AMQP endpoint (which I had initially implemented then later realized it is now available in SI 2 as well) operates on AmqpTemplate which is bound to a single connection. Per the AMQP spec, the vhost associated with a connection can't be changed once the connection has been established.
To summarize all that, the vhost part in the messaging component of my application is dynamically set and can be different per each message. I'm not sure how could I implement the messaging solution using SI and Spring AMQP so that each message will use an AMQP connection that's bound to the vhost of the message being sent.
I'm sharing this to get any insights and/or hints which would be greatly appreciated, and also to point Spring AMQP team to use cases which may be useful at this stage.
P.S. Right now I'm using SI 1


Reply With Quote
