Как создать сообщение с помощью Amazon MQ в .net 4.5 или более поздней версии?Я использую пакет Apache NMS для того же.
string mqtt = "mqtt+ssl://b-9d9f9270-1bef-4b4d-b180-719d4c7498e4-1.mq.ap-southeast-1.amazonaws.com:8883";
IConnectionFactory factory = new NMSConnectionFactory(new Uri(mqtt), clientId);
IConnection connection = factory.CreateConnection(uname, password);
ISession session = connection.CreateSession();
IDestination destination = session.GetDestination("topic://" + topic);
// IMessageConsumer consumer = session.CreateConsumer(destination);
IMessageProducer producer = session.CreateProducer(destination);
try
{
connection.Start();
producer.DeliveryMode = MsgDeliveryMode.Persistent;
ITextMessage request = session.CreateTextMessage(message);
request.NMSCorrelationID = "observation";
request.Properties["NMSXGroupID"] = "observation";
request.Properties["myHeader"] = "observation";
producer.Send(request);
Console.WriteLine(message);
}
Apache.NMS.NMSConnectionException: No IConnectionFactory implementation found for connection URI: mqtt+ssl://b-9d9f9270-1bef-4b4d-b180-719d4c7498e4-1.mq.ap-southeast-1.amazonaws.com:8883/
at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory (System.Uri uriProvider, System.Object[] constructorParams) [0x00043] in <53effb06f12a48e4933cd883c0e27b12>:0
Что мне нужно сделать, чтобы решить эту проблему?