Rhino ServiceBus: Sagas with multiple messages

Posted by illdev on Stack Overflow See other posts from Stack Overflow or by illdev
Published on 2010-05-26T19:43:59Z Indexed on 2010/05/27 20:21 UTC
Read the original article Hit count: 348

I have a saga that can handle multiple messages like so:

 public class OrderSaga : ISaga<Order>
        , InitiatedBy<StartOrderSaga>
        , Orchestrates<CancelOrder>
        , Orchestrates<PaymentForOrderReceived>
        , Orchestrates<CheckOrderWasPaid>
        , Orchestrates<OrderAbandoned>
        , Orchestrates<CheckOrderHasBeenShipped>
        , Orchestrates<OrderShipped>
        , Orchestrates<CheckOrderHasDelayDuringShipment>
        , Orchestrates<OrderArrivedAtDestination>
        , Orchestrates<OrderCompleted>
    {...}

but only Orchestrates<CancelOrder> seems to be picked up. So I suppose (I did not find the line, but am under a strong impression this is so), that only the first Orchestrates is registered.

Probably this is by design. From what I imagined a saga to be, it seems only logical that it receives many different messages, but I might be wrong. I might be wrong with my whole assumption, too :)

How am I supposed to handle this? Are Sagas supposed to only handle one (in my case) a ChangeStateMessage<State> or should I wire the other ConsumerOfs/Orchestrates by hand?

© Stack Overflow or respective owner

Related posts about c#

Related posts about servicebus