A Curious Mind
#tastic

More on handling messages

Sunday, June 15, 2008 5:51 PM

Message Handlers

So having been working on a small app using Mass Transit 0.2 I am trying to come to grips with how I want message handlers to be named and used. Do I call them consumers, do I call them handlers? What about some of the things Grey Young has been saying about message handlers being actual objects? I want to think about these things like MonoRail Controllers but I am not sure that is the best way to think of them. They stay around for one message and process that message then go away, which seems like a controller. However, if we are sending to domain objects, then they are going to have state which I think is bad.

hmmmm.. thoughts?


Feedback

# re: More on handling messages

What are you "sending to domain objects"? The messages? I've always been of the mindset that a message will eventually represent a method call on a domain object, so there would probably need to be some service objects that translate the message object into a call on the entity. I'm not sure if you meant passing the actual message object to the domain entity, which I don't think would be the way to go.

I think the interesting question is whether I would want to continue the typical Web-MVC way of putting a bunch of requests on one object or splitting them up. In other words, a handler for each message as opposed to the widely used handler for each domain object. 6/16/2008 6:48 PM | Mark Hildreth

Post a comment





 

Please add 8 and 1 and type the answer here: