def get_connection(self, properties, queue_name):
        (connection_dict, connection_tuple,
         exchange_dict, exchange_tuple) = self._extract_params(properties)
        connection_info = self.pool.get(connection_tuple)
        if connection_info is None:
            connection = driver.create_connection(connection_dict['host'],
                                                  connection_dict['port'],
                                                  connection_dict['user'],
                                                  connection_dict['password'],
                                                  connection_dict['library'],
                                                  connection_dict['vhost'])
            connection_info = (connection, {})
            self.pool[connection_tuple] = connection_info
        connection, exchange_pool = connection_info
        exchange = exchange_pool.get(exchange_tuple)
        if exchange is None:
            exchange = driver.create_exchange(exchange_dict['exchange_name'],
                                              exchange_dict['exchange_type'])
            exchange_pool[exchange_tuple] = exchange

            # Make sure the queue exists so we don't lose events.
            queue = driver.create_queue(queue_name, exchange, queue_name,
                                        channel=connection.channel())
            queue.declare()

        return (connection, exchange)


# Global ConnectionManager. Shared by all Handlers.
dataset/ETHPy150Open openstack/stacktach-winchester/winchester/pipeline_handler.py/ConnectionManager.get_connection/original