I used amqp client to connect ActiveMQ broker.
import amqp
USER = "guest"
PASSWORD = "guest"
HOST = 'localhost'
PORT = '5672'
host = HOST + ":" + PORT
conn = amqp.connection.Connection(host=host,userid=USER,password=PASSWORD,login_method='AMQPLAIN',ssl=True)
conn.connect()
Getting error : OSError: Server unexpectedly closed connection