I'm using a Windows machine trying to send secure messages over SSL with 
ActiveMQ, using the Apache NMS API for .NET and I really have no idea what to 
do.

In the broker.xml I tried adding "sslEnabled=true" to the default acceptor:

    <acceptor 
name="artemis">tcp://0.0.0.0:61616?sslEnabled=true;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>

I'm trying to set up a consumer like this:

    IConnectionFactory factory = new 
ConnectionFactory("activemq:stcp://localhost:61616");
    connection = (Connection)factory.CreateConnection();
    connection.Start();
    ISession session = connection.CreateSession();
    IDestination destination = session.GetTopic("topic1");
    consumer = session.CreateConsumer(destination);
    consumer.Listener += new MessageListener(HandleMessage);

When the code reaches the line `connection.Start()`, I get this exception:

>Channel was inactive for too long: tcp://localhost:61616/

I have tried changing the connection url like this (ssl in the middle instead 
of tcp):

    IConnectionFactory factory = new 
ConnectionFactory("activemq:ssl://localhost:61616");

And then I got this exception:

>Unable to read data from the transport connection: An established connection 
>was aborted by the software in your host machine

What am I doing wrong here? How can I send and receive secured messages?

Reply via email to