def METHOD_NAME(archiverconfig):
    bootstrap_servers = archiverconfig["server"]
    log.debug("Bootstrap server: " + bootstrap_servers)
    topic = archiverconfig["topic"]
    log.debug("Topic: " + topic)
    archiver_id = archiverconfig["archiver-id"]
    retries = archiverconfig["kafka-retries"]
    security_protocol = archiverconfig["security-protocol"]
    log.debug("Security protocol is"+security_protocol)
    global archiver
    if (security_protocol == SECURITY_PROTOCOL_SSL):
        log.debug("Found security protocol in config")
        archiver = psKafkaArchiver(
            bootstrap_servers=bootstrap_servers,
            archiver_id=archiver_id,
            topic=topic,
            retries=retries,
            security_protocol=security_protocol,
            ssl_cert=archiverconfig["_ssl-cert"],
            ssl_cacert=archiverconfig["_ssl-cacert"],
            ssl_key=archiverconfig["_ssl-key"],
            ssl_password=archiverconfig["_ssl-password"],
            ssl_checkhostname=archiverconfig["ssl-checkhostname"],
        )
    else:
        log.debug("Creating plain text archiver")
        archiver = psKafkaArchiver(
            bootstrap_servers=bootstrap_servers,
            archiver_id=archiver_id,
            topic=topic,
            retries=retries,
        )