Thank you Roman, that is exactly what I was looking for. I just didn't know this option is passed this way. I was looking through the doco but I couldn't find it. Any chance you could point me into right direction?
I don't want to ask another question in few days, just because I can't find the right document ;) Best regards, Krystian RomKal wrote: > > Hello Krystian! > > I believe you face this problem because delayer in Camel is > implemented simply with Thread.sleep() method, so the solution for you > would be to use <from > uri="activemq:queue:Input?concurrentConsumers=10" />. You can also > configure this parameter on component level. This way you can handle > 10 concurrent messages at a time. Of course this solution is not very > good if you have to wait longer and have higher rate of messages, but > should be OK in common situations. > > Roman > > 2008/5/30 Krystian Szczesny <[EMAIL PROTECTED]>: >> >> Hi again, >> >> I've encountered another problem with camel delayer. >> Well before it was a feature for me, but it became a problem ;] >> >> When using the delayer with methodCall it seems like there is only one >> process handling the route [I don't know how to put it in right words]. >> When I will send 10 messages it seems that each of them is handled >> separately. >> 10 messages are put into queue >> message 1 is taken, it is delayed, it is sent >> message 2 is taken, it is delayed, it is sent >> >> I would like to see something like this: >> message 1 is taken, it is delayed, >> message 2 is taken, it is delayed, >> message 3 is taken, it is delayed >> let's say that message 1 delay has come to an end so it is sent >> message 4 is take, it is delayed, >> mesage 2 delay has come to an end so it it sent >> and so on >> >> I need it to work asynchronously, is there a way to do that? >> >> When I use this settings: >> <camelContext id="camel" >> xmlns="http://activemq.apache.org/camel/schema/spring"> >> <route> >> <from uri="activemq:queue:Input" /> >> <delayer> >> <simple>header.JMSTimestamp</simple> >> <to uri="activemq:queue:Output" /> >> <delay>3000</delay> >> </delayer> >> </route> >> </camelContext> >> >> It seems to work this way, but I need to have more control over what is >> going on, so I really need that method call. >> >> When adding it: >> <camelContext id="camel" >> xmlns="http://activemq.apache.org/camel/schema/spring"> >> <route> >> <from uri="activemq:queue:Input" /> >> <delayer> >> <simple>header.JMSTimestamp</simple> >> <to uri="activemq:queue:Output" /> >> <methodCall bean="delayerBean" >> method="delay"/> >> <!-- <delay>3000</delay> --> >> </delayer> >> </route> >> </camelContext> >> >> It suddenly starts to work synchronously. >> >> I've tried nesting methodCall in <delay> but that didn't work either ;) >> >> I would appreciate some help in this matter. >> -- >> View this message in context: >> http://www.nabble.com/Delay-messages-with-camel-sequentially-tp17144701s22882p17555926.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Delay-messages-with-camel-sequentially-tp17144701s22882p17598355.html Sent from the Camel - Users mailing list archive at Nabble.com.
