Claus Ibsen-2 wrote: > > So to be clear you want to hold up messages in a memory queue, and if > a message grows older than 5 seconds it should be discarded? > > And a process will once every second process messages from the queue? >
Yes this is correct. To be more clear, the messages can be processed multiple times by the 1 second process. Claus Ibsen-2 wrote: > > Will it drain the queue? Or how many messages does it try to process? > What happens if there are more messages to process > than it can do within that 1 second time window? > The queue will be stripped of old messages, but relevant messages will remain in the memory queue to be processed again in a second. Claus Ibsen-2 wrote: > > Why do you want to use Quartz? > > There is a Timer which is simpler and can trigger once every second? > http://camel.apache.org/timer.html > > And if you want to poll on demand, then take a look at Polling Consumer > EIP > http://camel.apache.org/polling-consumer.html > The timer would trigger the process each second. This can access a static memory queue, trim the memory queue of old messages, poll the message queue for new messages, run the process. Though I don't feel too comfortable using a static memory queue. Can you recommend a sensible way to store the memory queue, so the process has quick access to it when the timer triggers. -- View this message in context: http://old.nabble.com/Question-about-processing-and-persistence-tp28507720p28518451.html Sent from the Camel - Users mailing list archive at Nabble.com.