I've been tinkering around with the same thing over the past few weeks. I'm hosting RSB in an asp.net MVC 3 app using MSMQ. I decided to give up on the remote app domain approach, as it seems to be an endless rabbit hole of issues due to the temporary folders the spawned app domains run in, especially if you are doing a lot of IoC. It was getting to be too much trouble for the simple single app instance queuing that I want. A host that lives and dies with the application's app domain is fine for what I am doing.
It might be worth mentioning that I have successfully hosted multiple DefaultHost instances at the same time in the application. I have one host for standard messaging, and another host for things that need to be throttled. In general, everything seems to work fine when running the site under full IIS. However, I run into weird subscription issues when using IIS 7 express or Cassini via Visual Studio. After the app goes idle and it receives a new request, the host start / bootstrapping code gets called, but a subscription isn't created. Restarting visual studio fixes this. I'm not very concerned about this however since I can use IIS as my host during development. - Dan On Jun 19, 3:21 pm, Eric Quist <[email protected]> wrote: > I reverted to more of a step by step approach, instead of trying to > put it in place in my "big" code base immediately and I blogged about > it > here:http://blog.irm.se/blogs/eric/archive/2011/06/18/Getting-Started-with...http://blog.irm.se/blogs/eric/archive/2011/06/19/Consuming-Events-in-...http://blog.irm.se/blogs/eric/archive/2011/06/19/Hosting-Rhino-Servic... > > In short I get it working with DefaultHost, but I think it could be > interesting to get it working with RemoteAppDomainHost too. > I tried your suggestion and it stops complaining about assmebly load > exception, but instead I get a ArgumentException complaining that the > string can't be empty. I then tried to send the path to the assembly > (and not just the folder) but that gives me a > ConfigurationErrorsException saying "could not find facility > configuration section with the same name of the facility". I'm to new > to RSB and Castle to have any real clue. When searching the exception > I found a tip too check the casing of the facility id, but that is > correct in my config-files. > > Any suggestions on how to get the code running with > RemoteAppDomainHost instead of DefaultHost is apprecieated. > > Thanks, Eric > > On 18 Juni, 20:38, René M. A <[email protected]> wrote: > > > > > > > > > Well your second approach with the RemoteAppDomainHost should be the way to > > go. You need to have a host for both the publisher of the events and the > > consumers of the events. And if you want them in the same process I guess > > the only way is to have the service bus for the event consumers hosted in a > > remote appdomain. > > > I have never tried to to use the RemoteAppDomainHost in a web application, > > maybe the appdomain created doesn't get the applicationbase path set > > correctly? Try using the constructor where you can specify the bin path of > > your web application along with the bootstrapper type: > > > public RemoteAppDomainHost(string assemblyPath, Type boosterType) > > > You then need to specify your configuration file using the following method > > on the RemoteAppDomainHost: > > > public RemoteAppDomainHost Configuration(string configFile) > > > It would then look something like this in your code: > > var consumerHost = new RemoteAppDomainHost("path to web app assemblies", > > typeof(ConsumerBootStrapper)) > > .Configuration("Consumers.config"); > > consumerHost .Start(); > > > Don't know if it will solve your problem, but its worth a shot... -- 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.
