Emmanuel Jones created AMQNET-770:
-------------------------------------
Summary: Cannot enable failover through NMSConnectionFactory
Key: AMQNET-770
URL: https://issues.apache.org/jira/browse/AMQNET-770
Project: ActiveMQ .Net
Issue Type: Bug
Reporter: Emmanuel Jones
The following throws an exception even when the assembly that corresponds to
the desired protocol (in this case, {{{}Apache.NMS.AMQP{}}}) is loaded on my
system:
{code:c#}
NMSConnectionFactory.CreateConnectionFactory(new
Uri("failover:(amqp://activemq:5672)"));
{code}
Exception stack trace:
{code:java}
Apache.NMS.NMSConnectionException: No IConnectionFactory implementation found
for connection URI: failover:(amqp://activemq:5672)
at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory(Uri uriProvider,
Object[] constructorParams)
at
MyCompany.MyProject.Sdk.Messaging.ActiveMq.AmqpMessageHandler.CreateConnectionFactory()
in /src/SDK/Libraries/SDKCore/Messaging/ActiveMq/AmqpMessageHandler.cs:line 920
at
MyCompany.MyProject.Sdk.Messaging.ActiveMq.AmqpMessageHandler..ctor(ActiveMQOptions
options, CommonMessageHeaderFields alertHeader, IFormatProviderFactory
formatProviderFactory, ILoggerFactory loggerFactory) in
/src/SDK/Libraries/SDKCore/Messaging/ActiveMq/AmqpMessageHandler.cs:line 132
at
MyCompany.MyProject.Sdk.Messaging.ActiveMq.MessageHandler..ctor(MessageBusOptions
options, IFormatProviderFactory formatProviderFactory, ILoggerFactory
loggerFactory) in
/src/SDK/Libraries/SDKCore/Messaging/ActiveMq/MessageHandler.cs:line 65
at
MyCompany.MyProject.Sdk.Utilities.DependencyInjectionExtensions.GetMessageHandler(IConfiguration
config, IFormatProviderFactory formatProviderFactory, ILoggerFactory
loggerFactory) in
/src/SDK/Libraries/SDKCore/Utilities/DependencyInjectionExtensions.cs:line 208
at
MyCompany.MyProject.Sdk.Utilities.DependencyInjectionExtensions.<>c.<AddMessaging>b__1_6(IServiceProvider
k) in
/src/SDK/Libraries/SDKCore/Utilities/DependencyInjectionExtensions.cs:line 112
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite
callSite, RuntimeResolverContext context)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
constructorCallSite, RuntimeResolverContext context)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite
callSite, RuntimeResolverContext context)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite
enumerableCallSite, RuntimeResolverContext context)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite
callSite, RuntimeResolverContext context)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite
callSite, TArgument argument)
at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite
callSite, ServiceProviderEngineScope scope)
at
Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type
serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key,
Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
serviceType)
at
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
provider)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken
cancellationToken)
at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost
host, CancellationToken token)
at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost
host, CancellationToken token)
at MyCompany.MyProject.Platform.Server.Program.Main(String[] args) in
/src/Platform/MyProjectServer/Program.cs:line 87
{code}
This is on version 2.0.0 of
[Apache.NMS|https://github.com/apache/activemq-nms-api].
--
This message was sent by Atlassian Jira
(v8.20.7#820007)