Configure.With(types) fails for RabbitMQ transport
this Configuration throws an exception:
Configure.With(types).UseTransport(RabbitMQ);
Exception message is: "We couldn't find a IConfigureTransport implementation for your selected transport: RabbitMQ" and I can see a couple of messages missing in the Config.InfrastructureServices logs - I guess some defaults aren't being set when custom scanning is in play...?
Missing messages from logs (these appear when using default scanning): "Default provider for infrastructure service NServiceBus.Transports.RabbitMQ.Routing.IRoutingTopology has been set to NServiceBus.Transports.RabbitMQ.Routing.ConventionalRoutingTopology, lifecycle: SingleInstance" and "Default provider for infrastructure service NServiceBus.Transports.RabbitMQ.IManageRabbitMqConnections has been set to a custom action"
Yes you need to include the types is the Rabbit transport dll in the scanning. Does that solve the issue?
On Tue, May 14, 2013 at 9:48 AM, Justin Thirkell [email protected]:
this Configuration throws an exception:
Configure.With(types).UseTransport(RabbitMQ);
Exception message is: "We couldn't find a IConfigureTransport implementation for your selected transport: RabbitMQ" and I can see a couple of messages missing in the Config.InfrastructureServices logs - I guess some defaults aren't being set when custom scanning is in play...?
Missing messages from logs (these appear when using default scanning): "Default provider for infrastructure service NServiceBus.Transports.RabbitMQ.Routing.IRoutingTopology has been set to NServiceBus.Transports.RabbitMQ.Routing.ConventionalRoutingTopology, lifecycle: SingleInstance" and "Default provider for infrastructure service NServiceBus.Transports.RabbitMQ.IManageRabbitMqConnections has been set to a custom action"
— Reply to this email directly or view it on GitHubhttps://github.com/NServiceBus/NServiceBus/issues/1174 .
http://andreasohlund.net http://twitter.com/andreasohlund
yes, it does thanks. i'm forcing it to pick up the assembly containing the transportType (we're switching transports via config at the moment until we settle on one).
static Configure ConfigureNsbWithScannedTypes(BootstrapperConfiguration config, Type transportType) {
var assembliesToScan =
// pick up all MyCompany* assemblies for the moment - maybe one day we'll restrict these to MyCompany.*.Events and MyCompany.*.Commands assemblies...
AllAssemblies.Matching("MyCompany.")
// need to include transport types and the MyCompany.Bus assembly
.Concat(new[] {transportType.Assembly, typeof(MyCompany.Bus.IBus).Assembly});
if (config.AssembliesToScan != null) {
assembliesToScan = assembliesToScan
.Concat(config.AssembliesToScan);
}
var typesToScan = assembliesToScan.SelectMany(a => a.GetTypes());
if (config.TypesToScan != null) {
typesToScan = typesToScan
.Concat(config.TypesToScan);
}
return Configure.With(typesToScan);
}