I've removed the nmr. Exception "org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints." still happens.
Is NMR camel endpoint shared accross multiple nodes of a cluster? And is declaration of "org.apache.servicemix.common.osgi.EndpointExporter" required? Accorging to the source code of EndpointExporter public Collection<Endpoint> getEndpoints() { Collection<Endpoint> eps = this.endpoints; if (eps == null) { eps = this.applicationContext.getBeansOfType(Endpoint.class ).values(); } return eps; } it requres org.apache.servicemix.common.Endpoint, so it is not applicable to org.apache.camel.Endpoint created by camel. I'm asking because I have a route that produces events and publishes them to a camel's nmr enpoint on one node of a cluster (separate servicemix instance) and I have a route that listens to events on a canel's nmr enpoint on the second node of the same cluster. I have changed etc/activemq-broker.xml on both nodes of a cluster so that they will know about each other node1: <networkConnectors> <networkConnector uri="static://(tcp://localhost:62616)" conduitSubscriptions="false"/> </networkConnectors> node2: <networkConnectors> <networkConnector uri="static://(tcp://localhost:63616)" conduitSubscriptions="false"/> </networkConnectors> How to make sure that the cluster is working and is it possible to share org.apache.camel.Endpoint accross the cluster? Claus Ibsen <claus.ib...@gmail.com> 25.11.2010 11:09 Please respond to users@camel.apache.org To users@camel.apache.org cc Subject Re: Is it possible to cluster camel endpoint? Hi Try removing the nmr bean, as it should work out of the box, without the need to specify such a bean. This should be removed: <bean id="nmr" class="org.apache.servicemix.camel.nmr.ServiceMixComponent"> <property name="nmr"> <osgi:reference interface="org.apache.servicemix.nmr.api.NMR"/> </property> </bean> On Thu, Nov 25, 2010 at 7:12 AM, <sergey_zhemzhit...@troika.ru> wrote: > Hi there > > I'm not using JBI. Each route is deployed as OSGi bundle. > > > > > > Claus Ibsen <claus.ib...@gmail.com> > 24.11.2010 20:15 > Please respond to > users@camel.apache.org > > > To > users@camel.apache.org > cc > > Subject > Re: Is it possible to cluster camel endpoint? > > > > > > > Hi > > Are you using JBI or not? The last statement was kinda confusing how I > read it. > > If you use JBI I suggest to use jbi to pass messages between applications. > > > On Wed, Nov 24, 2010 at 5:01 PM, <sergey_zhemzhit...@troika.ru> wrote: >> Well, it seems that my attachments have been dropped. >> >> Here are camel routes: >> >> route for cluster node 1: >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> <beans xmlns="http://www.springframework.org/schema/beans" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:osgi="http://www.springframework.org/schema/osgi" >> xsi:schemaLocation="http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd >> http://camel.apache.org/schema/spring >> http://camel.apache.org/schema/spring/camel-spring.xsd >> http://www.springframework.org/schema/osgi >> http://www.springframework.org/schema/osgi/spring-osgi.xsd"> >> >> <camelContext id="smx.cluster.publisher" xmlns=" >> http://camel.apache.org/schema/spring"> >> <route id="publishRoute"> >> <from uri="timer://events?fixedRate=true&period=1000"/> >> <transform> >> <constant>Hello World!!!</constant> >> </transform> >> <multicast> >> <to uri="log://smx.cluster.publisher?level=INFO"/> >> <to uri="nmr://smx.cluster"/> >> </multicast> >> </route> >> </camelContext> >> >> <bean id="nmr" >> class="org.apache.servicemix.camel.nmr.ServiceMixComponent"> >> <property name="nmr"> >> <osgi:reference >> interface="org.apache.servicemix.nmr.api.NMR"/> >> </property> >> </bean> >> >> </beans> >> >> route for cluster node 2: >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> <beans xmlns="http://www.springframework.org/schema/beans" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:osgi="http://www.springframework.org/schema/osgi" >> xsi:schemaLocation="http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd >> http://camel.apache.org/schema/spring >> http://camel.apache.org/schema/spring/camel-spring.xsd >> http://www.springframework.org/schema/osgi >> http://www.springframework.org/schema/osgi/spring-osgi.xsd"> >> >> <camelContext id="smx.cluster.subscriber" xmlns=" >> http://camel.apache.org/schema/spring"> >> <route id="receiveRoute"> >> <from uri="nmr://smx.cluster" /> >> <to uri="log://smx.cluster.subscriber?level=INFO"/> >> </route> >> </camelContext> >> >> <bean id="nmr" >> class="org.apache.servicemix.camel.nmr.ServiceMixComponent"> >> <property name="nmr"> >> <osgi:reference >> interface="org.apache.servicemix.nmr.api.NMR"/> >> </property> >> </bean> >> >> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" /> >> >> </beans> >> >> It is important to note that routes are not deployed are service units > for >> servicemix-camel jbi component. >> >> Regards, Sergey >> >> >> >> >> sergey_zhemzhit...@troika.ru >> 24.11.2010 18:55 >> Please respond to >> users@camel.apache.org >> >> >> To >> users@camel.apache.org >> cc >> >> Subject >> Re: Is it possible to cluster camel endpoint? >> >> >> >> >> >> >> Hi >> >> I have attached sample application (SMX-CLUSTER.zip) and configuration > of >> activemq in ServiceMix (SMX-CONFIG.zip) for clustering: >> >> To install the application please execute mvn install from command line. >> It is necessary to have two instances of ServiceMix for the cluster >> (configurations for activemq are in SMX-CONFIG.zip). >> >> Start both ServiceMix nodes and execute the following command in the >> console of the first one: >> >> features:addUrl >> mvn:org.sample.smx.cluster/smx.cluster.features/1.0.0-SNAPSHOT/xml >> features:refreshUrl >> features:install org.sample.smx.subscriber >> >> Execute the following commands in the console of the second node: >> >> features:addUrl >> mvn:org.sample.smx.cluster/smx.cluster.features/1.0.0-SNAPSHOT/xml >> features:refreshUrl >> features:install org.sample.smx.publisher >> >> I have expected that messages which were sent from the first node would >> reach the second node. >> >> I'm using: >> >> Fuse ESB: 4.3.0-fuse-01-00 >> JDK: 1.6.0_21-b07 (Sun) >> OS: Win XP Pro SP3 >> >> >> Regards, >> Sergey >> >> >> >> >> Claus Ibsen <claus.ib...@gmail.com> >> 24.11.2010 14:52 >> Please respond to >> users@camel.apache.org >> >> >> To >> users@camel.apache.org >> cc >> >> Subject >> Re: Is it possible to cluster camel endpoint? >> >> >> >> >> >> >> Hi >> >> Can you post more details >> >> FUSE ESB version used >> JDK used >> OS used >> And the Camel route you are using. >> >> And you can try using the latest release: v4.3.0-fuse-02-00 >> >> >> On Wed, Nov 24, 2010 at 10:06 AM, <sergey_zhemzhit...@troika.ru> wrote: >>> Hello all. >>> >>> I'm trying to use camel on the ServiceMix 4 cluster. >>> >>> According to http://camel.apache.org/clustering-and-loadbalancing.html >> we >>> can use NMR endpoint but there isn't an example there. >>> I have tried to connect from one node of a cluster to another using >>> camel's nmr component, but without success. An exception has occured. >>> >>> org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch >>> exchange. No matching endpoints. >>> at >>> >> > org.apache.servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java:110)[58:org.apache.servicemix.nmr.core:1.3.0.fuse-00-00] >>> at >>> >> > org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:286)[58:org.apache.servicemix.nmr.core:1.3.0.fuse-00-00] >>> at >>> >> > org.apache.servicemix.nmr.core.ChannelImpl.send(ChannelImpl.java:117)[58:org.apache.servicemix.nmr.core:1.3.0.fuse-00-00] >>> at >>> >> > org.apache.servicemix.camel.nmr.ServiceMixProducer.process(ServiceMixProducer.java:86)[191:org.apache.servicemix.camel.component:4.3.0.fuse-01-00] >>> at >>> >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:62)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:62)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> at >>> >> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[92:org.apache.camel.camel-core:2.4.0.fuse-00-00] >>> >>> Is it possible to use clustered endpoints in camel? >>> >>> >>> Best Regards, >>> Sergey >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: cib...@fusesource.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> >> >> > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/