This project is read-only.

As with any service bus, there are a number of configuration details to get straight before using them. The main areas to configure are:

  • PlatformConnectionData - This configuration data should come from the application configuration file hosting the endpoint.
    • appConfig keys expected:
      • CurrentExecutionEnvironment - Not required, but recommended. Default is 'Development'
      • [executionenvironment].BrokerConnectionString - Broker connection string is always required. Prefix the key with the execution environment name set in CurrentExecutionEnvironment appConfig setting.
    • Subscription data by default, is persisted to SQL Server using the default subscription data provider. This provider expects a connection string named [executionevironment].ReactorServices. Again, prefix with the current execution environment name.
  • ReactorServices database
    • As mentioned in the PlatformConnectionData section, subscriptions are persisted by default to a MS SQL Server database. In the SQL folder in source control, you'll find a script named DropAndCreateReactorServices.sql. This script will attempt to drop any database by the name ReactorServices and re-create it. This should give you everything you need for persisted endpoint subscriptions. One thing to note about the script, is that the path to the data and log file for the database may need to be altered for your environment or needs.


* - Path may need to be altered for your needs

  • ServiceLocator
    • Reactor Service Bus uses the CommonServiceLocator from MS and others. The CommonServiceLocator abstracts Ioc containers and allows easy swapping of containers via a common interface, IServiceLocator. By defualt, Reactor uses Unity, but any implementation of IServiceBus will work.
    • While service locators allow us to obtain instances without knowing their specific implementation, we also need to allow the registration of types with the service locator. This is typically done via the specific IoC container being used because the IServiceLocator interface does not support the registration of types. This is a fundamental argument about what a service locator's responsibility really is. Nevertheless, there are many parts of the Reactor Service Bus and Reactor Services Platform that need to make decisions on what implementations to make available. This is done via the Reactor.IServiceRegistrar interface. When supplying a CommonServiceLocator implementation, you will also need to provide the appropriate service registrar implementation. This should be registered with the underlying IoC container and for convenience, extension methods exist on IServiceLocator to pass through to this registrar, effectively giving us the ability to use the service locator instance for both registering types/instances and obtaining instances
  • Default Configuration
    • There are many extensibility points in the Reactor Service Bus, but a default configuration is provided in the Reactor.ServiceBus.Configuration.Default assembly. Within that assembly, there is a class named DefaultServiceBusCustomizer, which will take care of this default configuration. Should non-default configuration need to occur, take direction from how this class performs the setup of the various types in Reactor. This customizer expects there to be an IServiceLocator instance already created and ready.

Test Consoles

Two test consoles are provided in the solution. They are:

  • Reactor.ServiceBus.TestSubscriber
  • Reactor.ServiceBus.TestPublisher
These are a great place to start diving into Reactor Service Bus. Once the database is setup, your ActiveMQ broker is running, and all app.config settings are correct, just set these projects as the startup projects for the solution and start using them. Concepts proven by these consoles are:
  • Reactor's ability to perform basic pub/sub
  • Reactor's ability to support basic request/reply
  • Reactor's ability to quarantine failed messages after the configured number of handling failures
  • Reactor's ability to support polymorphic message dispatch

Last edited Feb 9, 2011 at 6:31 AM by akilhoffer, version 1


No comments yet.