Re: Advice Needed on Design (From ActiveMQ List)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Advice Needed on Design (From ActiveMQ List)

Adam Sherman
(I figure I should switch lists.)

On Oct 12, 2007, at 13:09, Adam Sherman wrote:
> On Oct 12, 2007, at 10:31, James Strachan wrote:
>> To get things going and to avoid you having to worry about how to use
>> the JMS API properly and so forth I'd recommend you experiment with
>> the Bean Integration in Camel...
> I'm not clear on what Camel actually is though. Going to go watch  
> your screencast now.

Ok, I'm trying to wrap my head around it.

I currently configure ActiveMQ as follows:

     <!-- JMS Broker -->
     <amq:broker id="broker1" useJmx="false" persistent="false">
             <amq:transportConnector uri="tcp://localhost:61616?
trace=true" />

     <!-- JMS ConnectionFactory to use, configuring the embedded  
broker using XML -->
     <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost?
create=false" />

     <amq:queue id="destination"  

Where "destination" is my first test destination.

Then I use Spring's MessageListenerAdapter to get messages into my POJO:

        <bean id="convertMessageListener"  
                    <property name="videoConverter"  
ref="videoConverter" />

        <bean id="convertMessageListenerContainer"
          <property name="concurrentConsumers" value="1"/>
          <property name="connectionFactory" ref="jmsFactory" />
          <property name="destination" ref="destination" />
          <property name="messageListener"  
ref="convertMessageListener" />

For sending messages to the videoConverter I just use Spring's  
JmsTemplate.convertAndSend() method.

Can you please quickly sketch out what I would do to use Camel here?

Thank you very much for your assistance.


Adam Sherman
+1 (613) 797-6819 | | sip:[hidden email]