Hi Chris, I like this kind of problems ;-) Do these two messages share a correlation key?
If yes, you can create a bean which acts like a Repository, accumulating message bodies or Exchanges under the correlation key. Could be implemented using Guava's MultiMap, or a DB if you need durable persistence, or a distributed cache if you require clustering without persistence. When a message arrives, you query the Repository for a previous message with the same correlation key. If it exists, you pick it up, do whatever manipulation is needed, and release the 3rd event. Kind of like a CyclicBarrier that stores the messages for later usage. P.S.: You could consider using the Aggregator EIP, but it'll block a thread until the 2nd event comes through. Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Wed, May 15, 2013 at 6:56 PM, Chris Wolf <cwolf.a...@gmail.com> wrote: > In my process, I have two events that must be completed before the > third can proceed. > One event is the arrival of a certain JMS message and the other is the > arrival of > a certain file type. The problem is, I cannot represent this in a > route pipeline because > one event may occur before the other and it's totally random from one > run to another. > > In the abstract, I'm thinking one of the EIP patterns, either > "resequencer" or "scatter-gather" > applies, but I'm not certain how to do this in a concrete way with > Camel. If anyone has > ideas, that would be great... > > Thanks, > > > Chris >