I created a broker on AWS where I have a list of endpoints like this:
amqp+ssl://b-***-1.mq.us-east-1.amazonaws.com:5671
ssl://b-***-1.mq.us-east-1.amazonaws.com:61617
stomp+ssl://b-***-1.mq.us-east-1.amazonaws.com:61614
mqtt+ssl://b-***-1.mq.us-east-1.amazonaws.com:8883
I tried to call the endpoints in a .NET application by using Apache.NMS.ActiveMQ, but I always get the error:
Apache.NMS.NMSConnectionException: 'No IConnectionFactory implementation found for connection URI: amqps://b***-1.mq.us-east-2.amazonaws.com:5671
This is my application:
using System;
using System.Threading;
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;
namespace Apache.NMS.ActiveMQ.Test
{
public class TestMain
{
public static void Main()
{
Uri connecturi = new Uri("amqp+ssl://b-***-1.mq.us-east-2.amazonaws.com:5671");
Console.WriteLine("About to connect to " + connecturi);
IConnectionFactory factory = new NMSConnectionFactory(connecturi);
.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Apache.NMS.ActiveMQ" Version="2.0.0" />
</ItemGroup>
</Project>
I opened the ports for inbound traffic and can access the broker console.
I also tried amqp://b-***-1.mq.us-east-1.amazonaws.com:5671
but without luck.
I can succesfully interact with a local server using:
Uri connecturi = new Uri("tcp://localhost:61616?wireFormat.tightEncodingEnabled=true");
Is there something missing?