分布式“Spring集成”上下文
你好 Spring 控制总线驻留在一个上下文中(或者我错了?) Spring 集成上下文将使用通道和适配器公开和使用服务。那么在分布式环境中,利用“Spring Integration”集成的最佳实践是什么?从某种意义上说,有多个对等节点在各自的上下文中运行,建议的传递消息的方法是什么? (jms;然后是哪个开源提供商)。 简而言之,如何利用 spring-integration 作为企业服务总线以及围绕它们的最佳实践是什么。
提前致谢
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 short how to leverage spring-integration as an Enterprise service bus and what are the best practises surrounding them.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
取决于要求,但您可以使用您喜欢的任何传输机制。如果总线很小,您可能喜欢使用 http 适配器,甚至更低的适配器,如 tcp 或 udp。如果您需要扩展,您最好通过 spring-amqp 查看 RabbitMQ 集成。
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 还允许我们利用 Spring 自己的事件机制。我们可以配置网关来侦听和发送 ApplicationEvents(就像 jms 消息一样)。您可以查看核心类(ApplicationEvent、ApplicationEventListener、ApplicationEventPublisherAware)以了解有关事件机制的更多信息。有关如何为 ApplicationEvents 定义网关的更多信息,请参阅 Spring Integration 参考手册
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