camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <>
Subject Re: [EIP] Can you please help me choose a correct design pattern ?
Date Tue, 08 Mar 2011 10:21:40 GMT
On 8 March 2011 09:59, Maxence Button <> wrote:
> Hi Claus !
> Thank you for welcoming me in the Camel community. I'm honored that you
> replied to my question .
> Yet, I'm afraid it's not that simple : as I wrote it earlier, I played with
> the Aggregator and I guess it's almost what I'm looking for. I came to that
> pattern thanks to your book and the other reference book about EIP.
> What I have doubts about is the completion criteria. The case I described
> was voluntarily simplified but my patterns are much more complex.
> For instance, I have a process that should be able to receive an
> undetermined number of messages (let's say of type "Item") and when a single
> message "EndOfOrder" is received, then the process sends another message on
> the message broker saying the order has been completed. And that message
> triggers another process and so on.

So the completion predicate is then an expression detecting the
EndOfOrder message.

> About the correlation, I had exactly the same "problem" with BPEL process
> manager : my messages have no correlation between them : they come from
> different routes linked to different partners who have nothing in common. I
> was forced to trick the system by asking all the partners to enter a fake
> property on which I could base my correlation. It's working but I'm not
> fully satisfied with it ...

So there is no concurrency in your system and all messages arrive in
the exact order, pre sorted into aggregation pairs right? OrderA,
Order B, EndOfOrder then OrderC, OrderD, EndOfOrder etc? Things never
get mixed up out of order on a route?

If there is no correlation at all between the messages, then all
messages correlate with each other. So just use a constant expression
for the correlation key, like "foo".

> What I'm looking for, is exactly the Oracle | BEA WLI message broker feature
> : channels with components listening for some messages, matching the
> criteria I've defined, that's all. No correlation needed.

If there's no correlation or aggregation and its just a filter, then
this sounds like a message filter?

But your previous post sounded like you were trying to aggregate
messages together; that is that when you have completed a set of
messages you want to send a message (but only when a set is complete).
So its sounding like an Aggregator; the difference is that there's no
correlation required as everything arrives in order - and you don't
need to aggregate the messages together as you are sending a constant
message at the end. But other than that its sounding like an
aggregator where you either use a fixed batch size or a completion
predicate (detecting the EndOfOrder message)?

Twitter: jstrachan

Open Source Integration

View raw message