2009/1/14 efender <eric+nab...@fender.net>: > > We have servers deployed in several tiers. Servers should only consume > messages generated by itself or other members of the tier. I'm implementing > this with a JMS message selector. The problem is that the configuration is > a bit ugly: > > <bean id="blockUserEndpoint" parent="baseBlockUserMasterEndpoint" > class="org.apache.camel.component.jms.JmsQueueEndpoint"> > <constructor-arg index="0" type="java.lang.String" > value="blockUserJms:queue:BlockUserQueue"/> > <constructor-arg index="1" > type="org.apache.camel.component.jms.JmsComponent" ref="blockUserJms"/> > <constructor-arg index="2" type="java.lang.String" > value="BlockUserQueue"/> > <constructor-arg index="3" > type="org.apache.camel.component.jms.JmsConfiguration" > ref="jmsConfiguration"/> > <property name="camelContext" ref="blockUserCamelContext"/> > <property name="selector" ref="tierSelector"/> > </bean>
Using the zero-arg constructor and properties is maybe a bit cleaner? BTW rather than using selectors - why not use a different queue for each tier? Only then its easier to browse what each tier is doing We could start making mini-Spring XML languages for certain endpoints; e.g. <jms:endpoint queue="someQueue" selector="..." .... -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/