def producer_config(config):
    """Filter the producer config"""
    for field in ["group.id", "partition.assignment.strategy", "session.timeout.ms", "default.topic.config"]:
        if field in config:
            del config[field]

    return config