Hi,
I try to understand the logic that we have behind the configuration of a
cluster of two instances of SMX as described in the example cluster.
1) Cluster Name
The cluster.xml file of each instance contains the following property :
<features>
<repository>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</repository>
<repository>mvn:org.apache.servicemix.features/apache-servicemix/${servicemix.features.version}/xml/features</repository>
<feature name="cluster-example-smx2">
<config name="org.apache.servicemix.jbi.cluster.config">
clusterName=smx2
</config>
<feature>activemq</feature>
<feature>jbi-cluster</feature>
</feature>
</features>
but the clusterName is different between the two cluster SMX1 and SMX2.
Question : How can the two SMX instance be part of the same cluster if
the name is different ?
2) Camel Endpoint
The SMX2 instance contains the camel route
<!-- Define a camel route using a JBI endpoint to receive
exchanges from the other instance -->
<camel:camelContext>
<camel:route>
<camel:from
uri="jbi:endpoint:http://servicemix.apache.org/examples/camel/receiver/endpoint"
/>
<camel:to uri="log:test" />
</camel:route>
</camel:camelContext>
Where does this name
(http://servicemix.apache.org/examples/camel/receiver/endpoint") comes
from ?
How camel can though NMR/JBI retrieve the following quartz jbi
endpoint as this one is published like this ?
<!-- Define a quartz endpoint, firing JBI exchangs every 500 ms -->
<quartz:endpoint id="quartzEndpoint" service="b:service"
endpoint="endpoint" targetService="b:receiver">
<quartz:trigger>
<quartz:simple repeatCount="500" repeatInterval="500"
startDelay="2000" />
</quartz:trigger>
</quartz:endpoint>
<!-- Export the endpoints and create a service assembly -->
<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
<!-- Register the quartzEndpoint endpoint as a clustered endpoint -->
<bean
class="org.apache.servicemix.jbi.cluster.engine.OsgiSimpleClusterRegistration">
<property name="endpoint" ref="quartzEndpoint" />
</bean>
Kind regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard
Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm