Is the message owner the guy handling the message or the guy sending
the message?
In my scenario they are really the same I think...
In my facilities.config
<facility id="rhino.esb" >
<bus threadCount="1"
numberOfRetries="5"
logEndpoint="msmq://localhost/myapp.log"
endpoint="msmq://localhost/myapp.backend"
/>
<messages>
<add name="MyApp.Messages"
endpoint="msmq://localhost/myapp.backend"/>
</messages>
</facility>
Then I have this message class
namespace MyApp.Messages {
public class SimpleMessage {
public string Content {get;set;}
}
}
I then have a MR controller
public class MyController {
public void Submit(string content) {
var bus = IoC.Resolve<IServiceBus>();
var message = new SimpleMessage(content);
bus.Notify(message); //nothing to do because there are no
subscribers
}
}
Now, I had been planning on _not_ setting up a separate service to
handle messages and instead just have everything live in my web
application. Is that really really bad or just bad? Maybe that is why
I am so confused?
On Jan 19, 4:09 pm, Ayende Rahien <[email protected]> wrote:
> a) usually... yes. b) no, you don't.
> You need to register this in the message owner's configuration.
>
> <castle>
>
> <facilities>
>
> <facility id="rhino.esb" >
>
> <bus threadCount="1"
>
> numberOfRetries="5"
>
> endpoint="msmq://localhost/nhprof.backend"
>
> />
>
> <messages>
>
> <add name="NHProfilerWeb.Backend.InternalMessages"
>
> endpoint="msmq://localhost/nhprof.backend"/>
>
> <add name="NHProfilerWeb.Messages"
>
> endpoint="msmq://localhost/nhprof.backend"/>
>
> </messages>
>
> </facility>
>
> </facilities>
>
> On Mon, Jan 19, 2009 at 4:43 PM, chrisortman <[email protected]> wrote:
>
> > Sorry, I don't think I understand...
>
> > a) Are you saying that there will always be other endpoints?
>
> > b)
> > I need to define in my application something like this?
> > public class Something : ConsumerOf<AdministrativeMessage> {
> > public void Consume(AdministrativeMessage m) {
> > //nothing to do here
> > }
> > }
>
> > On Jan 19, 3:20 pm, Ayende Rahien <[email protected]> wrote:
> > > a) you assume that there are other end points.b) make sure that you have
> > > message owners defined for the bus' messages, that will handle the
> > > subscriptions.
>
> > > On Mon, Jan 19, 2009 at 4:03 PM, chrisortman <[email protected]>
> > wrote:
>
> > > > I think why I am getting confused is that whatever bus i use to Send|
> > > > Notify|Publish should be an implicit subscriber since it can consume
> > > > its own messages. Otherwise I can't see why to use Notify|Publish if
> > > > there are no other endpoints.
>
> > > > On Jan 19, 2:05 pm, Ayende Rahien <[email protected]> wrote:
> > > > > No, because discarded messages are for _arriving_ messages.
>
> > > > > On Mon, Jan 19, 2009 at 2:43 PM, chrisortman <[email protected]>
> > > > wrote:
>
> > > > > > Currently when doing IServiceBus.Notify(message) nothing happens if
> > > > > > there are no subscribers.
> > > > > > Should this also generate a discarded message?
>
> > > > > > On Jan 19, 11:04 am, Ayende Rahien <[email protected]> wrote:
> > > > > > > That is an extremely common approach.
> > > > > > > For that matter, here is the real configuration behind the NH
> > Prof
> > > > > > website:
>
> > > > > > > <castle>
>
> > > > > > > <facilities>
>
> > > > > > > <facility id="rhino.esb" >
>
> > > > > > > <bus threadCount="1"
>
> > > > > > > numberOfRetries="5"
>
> > > > > > > endpoint="msmq://localhost/nhprof.backend"
>
> > > > > > > />
>
> > > > > > > <messages>
>
> > > > > > > <add name="NHProfilerWeb.Backend.InternalMessages"
>
> > > > > > > endpoint="msmq://localhost/nhprof.backend"/>
>
> > > > > > > <add name="NHProfilerWeb.Messages"
>
> > > > > > > endpoint="msmq://localhost/nhprof.backend"/>
>
> > > > > > > </messages>
>
> > > > > > > </facility>
>
> > > > > > > </facilities>
>
> > > > > > > On Mon, Jan 19, 2009 at 12:00 PM, chrisortman <
> > [email protected]
>
> > > > > > wrote:
>
> > > > > > > > Does it violate anything if the same bus that sends the message
> > is
> > > > > > > > also the one that is watching that queue?
>
> > > > > > > > Lets say I have 2 apps.
> > > > > > > > 1 NHProf website
> > > > > > > > 2 Windows Service that does order processing
>
> > > > > > > > So in the web app I would do something like
> > > > > > > > <facility id="rhino.esb" >
> > > > > > > > <bus threadCount="1"
> > > > > > > > numberOfRetries="5"
> > > > > > > > endpoint="msmq://localhost/nhprof.web"
> > > > > > > > />
> > > > > > > > <messages>
> > > > > > > > <add name="nhprof"
> > > > > > > > endpoint="msmq://localhost/nhprof.orders"/>
> > > > > > > > </messages>
> > > > > > > > </facility>
>
> > > > > > > > And then the service app:
> > > > > > > > <facility id="rhino.esb" >
> > > > > > > > <bus threadCount="1"
> > > > > > > > numberOfRetries="5"
> > > > > > > > endpoint="msmq://localhost/nhprof.svc"
> > > > > > > > />
> > > > > > > > <messages>
> > > > > > > > <add name="nhprof"
> > > > > > > > endpoint="msmq://localhost/nhprof.orders"/>
> > > > > > > > </messages>
> > > > > > > > </facility>
> > > > > > > > On Jan 19, 10:53 am, Ayende Rahien <[email protected]> wrote:
> > > > > > > > > No, there is an assumption that that queue exists.
>
> > > > > > > > > On Mon, Jan 19, 2009 at 11:50 AM, chrisortman <
> > > > [email protected]
>
> > > > > > > > wrote:
>
> > > > > > > > > > Is there an assumption then that there exists a bus that is
> > > > > > watching
> > > > > > > > > > that endpoint?
>
> > > > > > > > > > On Jan 19, 10:27 am, Ayende Rahien <[email protected]>
> > wrote:
> > > > > > > > > > > inline
>
> > > > > > > > > > > On Mon, Jan 19, 2009 at 10:43 AM, chrisortman <
> > > > > > [email protected]
>
> > > > > > > > > > wrote:
>
> > > > > > > > > > > > Is it correct to say that a Discarded message is any
> > > > message
> > > > > > that
> > > > > > > > > > > > arrives at an endpoint but has no consumers registered
> > for
> > > > it?
>
> > > > > > > > > > > yes
> > > > > > > > > > > another option is that this is a saga message that
> > doesn't
> > > > have a
> > > > > > > > saga
> > > > > > > > > > > instance to orchestrate it.
>
> > > > > > > > > > > > I am also not understanding why messages have their own
> > > > > > endpoint or
> > > > > > > > > > > > when they should share the same endpoint as the bus?
>
> > > > > > > > > > > > I am running the trunk right now, and when I use this
> > as my
> > > > > > config
> > > > > > > > > > > > <facility id="rhino.esb" >
> > > > > > > > > > > > <bus threadCount="1"
> > > > > > > > > > > > numberOfRetries="5"
>
> > > > > > > > > > > > logEndpoint="msmq://localhost/my.log"
> > > > > > > > > > > > endpoint="msmq://localhost/rhino"
> > > > > > > > > > > > />
> > > > > > > > > > > > <messages>
> > > > > > > > > > > > <add
> > > > name="MyMessageAssembly"
>
> > endpoint="msmq://localhost/my.subscriptions"/>
> > > > > > > > > > > > </messages>
> > > > > > > > > > > > </facility>
>
> > > > > > > > > > > > I get errors because the my.subscriptions queue doesn't
> > > > exist.
>
> > > > > > > > > > > The problem that you have is that you are trying to send
> > the
> > > > > > message
> > > > > > > > to a
> > > > > > > > > > > non existing bus.
>
> > > > > > > > > > > The reason that you have to specify an endpoint several
> > times
> > > > is
> > > > > > that
> > > > > > > > the
> > > > > > > > > > > bus' endpoint says what queue the bus listen on.
> > > > > > > > > > > The message endpoint specify what is the owner of a
> > > > particular
> > > > > > set of
> > > > > > > > > > > messages.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---