saga finders and ConsumerOf base types patch

3 views
Skip to first unread message

tyler.burd

unread,
Aug 10, 2009, 8:09:58 PM8/10/09
to Rhino Tools Dev
Hi all,

I just uploaded a revised patch that implements both the concept of
saga finders and the concept of consuming base types and interfaces.
It is saga_finders_and_consumer_base_types.patch.

The saga finders feature allows any message to trigger a saga, even if
it is not an ISagaMessage. This is useful for when a saga depends on
other sagas or handlers to do it's work, and the messages sent by
those components do not implement ISagaMessage. All you need to do is
create a class such as the following:

public class MySagaFinder : FinderOf<MySaga>.By<SomeMessage>
{
public MySaga FindBy(SomeMessage msg)
{
//find the saga somehow using the msg
}
}

The consumer of base types feature allows you to write ConsumerOf
classes that target base classes or interfaces of messages. So if you
have the following:

-MyMessage
-MyMessage2 : MyMessage

Then this consumer would consume them both:

public class ConsumerOf<MyMessage> {...}

Both of these features borrowed heavily from concepts in NServiceBus.
It was easier to create a patch for both features at once rather than
individually, since they both change the same areas in the code.
Ayende, if you do need them separated to evaluate them, please let me
know.

-tyler burd

Ayende Rahien

unread,
Aug 19, 2009, 2:37:05 AM8/19/09
to rhino-t...@googlegroups.com
Applied
Reply all
Reply to author
Forward
0 new messages