title: Unable to connect to stomp (activemq) push data server in python, whereas in Java it succeeds
body: <p>In Java I'm able connect to a data push service and subscribe to it. It's a <code>stomp</code> or <code>OpenWire</code> protocol I believe. The point is, this java code works well (it's a part of it):</p>
  
  <pre><code>import javax.jms.Connection;
  import javax.jms.ConnectionFactory;
  import javax.jms.JMSException;
  import javax.jms.Message;
  import javax.jms.MessageConsumer;
  import javax.jms.Session;
  import javax.jms.TextMessage;
  import javax.jms.Topic;
  
  ConnectionFactory factory = new ActiveMQConnectionFactory(API_KEY, API_KEY, "ssl://api.something.com:61616");
  Connection connection = factory.createConnection();
  connection.setClientID(clientId);
  
  session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
  Topic topic = session.createTopic(topicName);
  messageConsumer = session.createDurableSubscriber(topic, subId);
  JMSMessageListener listener = new JMSMessageListener();
  messageConsumer.setMessageListener(listener);
  connection.start();
  </code></pre>
  
  <p>However in Python I can't do this with the error being <code>stomp.exception.ConnectFailedException</code>. The code:</p>
  
  <pre><code>import stomp
  
  URL = "ssl://api.something.com"
  PORT = 61616
  
  class MyListener(stomp.ConnectionListener):
    def on_message(self, headers, message):
      #...
    def on_error(self, headers, message):
      #...
  
  conn = stomp.Connection(host_and_ports=[(URL, PORT)], prefer_localhost=False)
  conn.set_listener("", MyListener())
  conn.start() # error -&gt; stomp.exception.ConnectFailedException
  </code></pre>
  
  <p>What am I doing wrong? As you can see, the protocol, url and port is the same.</p>