Distributed "Spring Integration" contexts
Hi The spring control bus resides in one context (or am i wrong ?) A spring integration context would expose and consume services using channels and adaptors. So in a distributed environment what is the best practise to take advantage of integration of "spring integration". In the sense that there are several peer nodes running each within their own context what is the suggested methodology of passing messages ? (jms ; then with which open source provider). In sh开发者_C百科ort how to leverage spring-integration as an Enterprise service bus and what are the best practises surrounding them.
Thanks in advance
Depends on the requirements, but you can use any transport mechanism you like. If the bus can be small you might like to work with http adapters or even lower like tcp or udp. If you need to scale you might best look into the RabbitMQ integration through spring-amqp.
Spring Integration also allows us to leverage Spring's own eventing mechanism. We can configure gateways to listen for and send ApplicationEvents (just like for jms messages). You can check out the core classes (ApplicationEvent, ApplicationEventListener, ApplicationEventPublisherAware) to understand more about the eventing mechanism. And more information on how to define gateways for ApplicationEvents is available in the Spring Integration reference manual
精彩评论