On 8/8/07, Carlos Devoto <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to create a service unit for the servicemix-jms component > that can act as a durable subscriber? I am currently using an > xbean.xml(see below), and I don't see any way to stipulate durability. > > Any help would be greatly appreciated. We are currently evaluating the > possibility of using ServiceMix to integrate a large number of products, > but I am having problems performing tasks that most would consider quite > basic. > > > <beans xmlns:jms="http://servicemix.apache.org/jms/1.0" > xmlns:sub="http://www.compuware.com/subscriber/1.0"> > > <jms:endpoint service="sub:jms-cos-output-durable-consumer1" > endpoint="endpoint" > targetInterfaceName="sub:durable-subscriber1" > role="consumer" > destinationStyle="topic" > jmsProviderDestinationName="sample.output" > connectionFactory="#jmsFactory" > defaultMep="http://www.w3.org/2004/08/wsdl/in-only" /> > > <bean id="jmsFactory" > class="org.apache.activemq.pool.PooledConnectionFactory"> > <property name="connectionFactory"> > <bean > class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" > value="tcp://localhost:61616" /> > </bean> > </property> > </bean> > > </beans>
The newer jms:consumer supports this, but the older jms:endpoint does not. There are some docs for the newer endpoints here, but they're not comprehensive: http://incubator.apache.org/servicemix/servicemix-jms-new-endpoints.html But you'll have to look at the source to see the setters for duability. See the setSubscriptionDurable() and setDurableSubscriptionName() methods. One thing to note about the new servicemix-jms consumer endpoint is that it uses the Spring AbstractMessageListenerContainer (http://www.springframework.org/docs/api/org/springframework/jms/listener/AbstractMessageListenerContainer.html) which seems to be almost infinitely configurable and a very nice to use because it handles so many aspects of message consumption. Bruce -- perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache ActiveMQ - http://activemq.org/ Apache ServiceMix - http://servicemix.org/ Apache Geronimo - http://geronimo.apache.org/ Castor - http://castor.org/
