Re: async send with preserved order

2011-06-01 Thread Claus Ibsen
Are you sure you want preserved order on the sender side? In essence to do that you may have to use a thread pool of 1, so the tasks are processed in sequence. I would assume the JDK in fact does grab the taks by order by default as the thread pool executor uses a queue for the tasks (FIFO). On

Re: async send with preserved order

2011-06-01 Thread Jim Newsham
Hi Claus, Yeah I mentioned the single-threaded executor in my initial email, as the only way I know to make that work, and also pointed out the undesirable performance impact this approach has. I would really like for all messages to be sent out in order without waiting for the result of

async send with preserved order

2011-05-31 Thread Jim Newsham
Is it possible to send asynchronously while preserving order? For example: for (int i = 0; i = COUNT; i++) { Object body = Integer.valueOf(i); producerTemplate.asyncCallbackRequestBody(URL, body, callback); } Assuming that URL is a FIFO queue, is there some way for