I need to configure Camel DSL / routes in such a way that on of my old
classes gets objects from JMS queue and sends objects to another JMS queue.


I can use Camel API to do that, but it seems like in such a case I almost do
not use Camel:

CamelContext context = new DefaultCamelContext();
        context.addComponent("activemq",
ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
        context.start();
        Endpoint endpoint =
context.getEndpoint("activemq:test.queue?concurrentConsumers=2");
        PollingConsumer consumer = endpoint.createPollingConsumer();


It is still not clear for me how should I do that in a "Camel way", using
Spring, annotations and mapping.

 Also one more important question: we have 1000 messages in a queue, POJO
class gets a message, as it mapped for this queue (analog of onMessage()
method), I need some time to process this message (sure there are multiple
threads), and sometimes I can not process this message immediately, so I
have 2 options: 1. to wait (either with Thread.sleep() or waiting for an
event) or 2. put this message back to queue. The question is - may I just
wait (case 1) or it's necessary to throw an exception  and return this
message back to queue?
-- 
View this message in context: 
http://www.nabble.com/Newbie%3A-Mapping-JMS-Camel---Spring-to-POJO%2C-ActiveMQ-Queues-tp21558031s22882p21558031.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to