[ 
https://issues.apache.org/jira/browse/AMQNET-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robbie Gemmell closed AMQNET-632.
---------------------------------
    Resolution: Invalid

> Connect to AmazonMQ broker using Apache.NMS.AMQP
> ------------------------------------------------
>
>                 Key: AMQNET-632
>                 URL: https://issues.apache.org/jira/browse/AMQNET-632
>             Project: ActiveMQ .Net
>          Issue Type: Improvement
>          Components: AMQP
>    Affects Versions: 1.8.0
>            Reporter: Krunoslav Andričević
>            Priority: Major
>
> I am having trouble connecting to my AmazonMQ broker using Apache.NMS.AMQP 
> client.
> I have AmazonMQ broker up and running and I can connect to broker console. In 
> my .NET project I have installed Apache.NMQ.AMQP NuGet (v1.8.0) which should 
> be used to connect to ActiveMQ brokers over AMQP.
> According to AWS console for Amazon MQ this is the brokers AMQP endpoint, 
> notice {{amqp+ssl}} schema:
> {code:c#}
> amqp+ssl://*my-broker-url*.amazonaws.com:5671
> {code}
> This code snippet is used to connect to broker:
> {code:c#}
> var endpoint = "amqp+ssl://*my-broker-url*.amazonaws.com:5671";
> var connectionFactory = new NmsConnectionFactory(endpoint);
> var connection = connectionFactory.CreateConnection("myTestUserName", 
> "myTestPassword");
> connection.Start();
> {code}
> When using above specified code snippet and broker URL I get following 
> exception when calling {{connection.Start()}} method: 
> {code:c#}
> Apache.NMS.NMSException: Failed to create Provider instance for amqp+ssl{code}
>  After some research I've realised that broker should be configured for 
> {{amqp+ssl}} transport connector which I've tried according to [ActiveMQ 
> documentation|[http://activemq.apache.org/amqp]] for AMQP. So I have tried 
> adding following XML to broker configuration:
> {code:xml}
> <broker>
>     <!-- some other configuration entries -->
>     <transportConnectors>
>         <transportConnector name="amqp+ssl" uri="amqp+ssl://localhost:5671"/>
>     </transportConnectors>
>     <!-- some other configuration entries -->
> </broker>
> {code}
> When trying to save edited configuration AWS presents me the following 
> message:
> {code:java}
> The specified XML configuration data is invalid: cvc-attribute.3: 
> The value 'amqp+ssl' of attribute 'name' on element 'transportConnector' is 
> not valid with respect to its type,
> 'protocol'. and cvc-enumeration-valid: 
> Value 'amqp+ssl' is not facet-valid with respect to enumeration '[openwire]'. 
> It must be a value from the enumeration.
> {code}
> Which, I suppose, means that only 'openwire' transport connector is allowed 
> to be specified in configiration.The next solution that I've tried is 
> changing broker URL to use amqp schema so I got following:
> {code:c#}
> var endpoint = "amqp://*my-broker-url*.amazonaws.com:5672";
> {code}
> instead of
> {code:c#}
> var endpoint = "amqp+ssl://*my-broker-url*.amazonaws.com:5671";
> {code}
> which also threw me an exception when calling {{connection.Start()}} with 
> following message:
> {code:java}
> Apache.NMS.NMSException: 
> A connection attempt failed because the connected party did not properly 
> respond after a period of time, 
> or established connection failed because connected host has failed to respond.
> {code}
> Is there any way to connect to Amazon managed ActiveMQ broker using AMQP 
> protocol and .NET and if there is what am I missing here?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to