简体   繁体   中英

Running camel in standalone mode

I have a system that consists of several thick client apps that communicate with each other. The apps currently communicate directly with each other over rmi but I a exploring options for using a messaging framework, specifically camel.

I know camel can be run in standalone (often when we do testing) but is often deployed in a container or esb. Is it appropriate to run camel in standalone mode if the only apps communicating with it are desktop (swing) apps?

Well yes and no. Camel is a message router, it helps you defining routes for your calls. However it will not help you choosing communication protocol. It just makes the integration quicker and faster (for example use JMS to communicate App1 <-> App2, RMI for App2 <-> App3 and some other protocol for App2 <-> App3).

Yes, Camel might be deployed in Standalone version. Here is link how to do this . I would advice to create separate application (I would also use Shade Maven plugin here to embed all dependencies).

You might also consider using some ESB, for example Servicemix or Fuse. However this is pretty big environment...

Actually, a vanilla installation (unzip that is) of ActiveMQ (5.5.1 for instance) will come bundled with Camel. Simply edit conf/activemq.xml and insert somewhere. Configure camel at conf/camel.xml. ActiveMQ does not come with all Camel components, so simply drop any additional camel jar file into /lib. You can easy just drop any of your own .jar files that for instance definies a RouteBuilder etc. in /lib to.

To communicate between applications I would use a standalone ActiveMQ broker (typically two instances for failover) and embed camel into the thick client applications. You can then use the pojo messaging features in camel to achieve almost transparent communication.

See my blog for an example http://www.liquid-reality.de/x/NoBe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM