def _get_ciphers_from_sockets(brokers):
    """Obtain ciphers currently used by pykafka BrokerConnections"""
    ciphers = set()
    for b in brokers.values():
        ciph = b._connection._socket.cipher()
        if ciph is not None:
            ciphers.add(ciph[0])
    return ','.join(ciphers)
