L.S.,
Apache ServiceMix is more of a container for integration solutions that packages ActiveMQ, Camel, CXF, ... together nicely. It doesn't have a real clustering solution itself, but for high availability and load balancing we usually rely on JMS queues on ActiveMQ. Your observation is correct that the rest of the solution is highly dependent on the actual endpoint type you're using. For the CXF endpoint, a hardware load balancer or a software solution using e.g. Apache HTTP's mod_proxy_balancer should work fine. For the FTP endpoints, it depends a bit on the type of FTP server and the commands it supports, what actually works for you. You have to avoid reading from the same file at the same time (using a lock strategy, rename the files, ...) yourself. Apart from these basic workarounds, you could have a look at Fabric, which has a master: component for Camel to ensure only one of the routes is active in the cluster or build your own GenericFileProcessStrategy implementation that can use a shared database/resource to figure out which files are being processed. Regards, Gert Vanthienen On Thu, Apr 25, 2013 at 6:10 PM, Michalis <[email protected]> wrote: > Hi all, > > I've read many resources on this forum and on web and I'm confused about how > can I have 2 instances of smx clustered. > Ok I understand that high availability and clustering is provided through > the activemq broker but let me describe the following scenario. > > Suppose I deploy the following routes in smx (simplified) > *First* > /"take an xml file from an ftp server put it in a queue do smth and send > data from file to a webservice end point"/ > > from(ftp://...).to(jms:queue:...) > from(jms:...).to(cxf:endpoint2) > > *Second* > /"expose a webservice take xml data from it place them on a queue, do smth > and send data to a webservice end point/t" > > from(cxf:endpoint1).to(jms:queue:...) > from(jms:queue:...).to(cxf:endpoint2) > > So if deploy exactly the same routes in 2 smx instances does this mean for > the first scenario that > the first smx who takes access to the file in ftp server does the > processing? > Could this result to an error or something like conflict? > > In second scenario how can 2 smx expose a a web service in same url? What > load balancer can I have in front to manage HTTP traffic? How can this be > done? > > Is this clustering after all? > > Thanks in advance! > > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
