(
        federation_session_id: str,
        party: Party,
        runtime_conf: dict,
        rabbitmq_config: dict,
    )
return Federation(
            federation_session_id, party, mq, rabbit_manager, max_message_size
        )
federation_info = runtime_conf.get("job_parameters", {}).get(
            "federation_info", {}
        )
        union_name = federation_info.get("union_name")
        policy_id = federation_info.get("policy_id")
federation_info = runtime_conf.get("job_parameters", {}).get(
            "federation_info", {}
        )
        union_name = federation_info.get("union_name")
        policy_id = federation_info.get("policy_id")
federation_info = runtime_conf . get ( job_parameters {} ) . get ( federation_info {} ) union_name = federation_info . get ( union_name ) policy_id = federation_info . get ( policy_id )
def from_conf(
        federation_session_id: str,
        party: Party,
        runtime_conf: dict,
        rabbitmq_config: dict,
    ):
        LOGGER.debug(f"rabbitmq_config: {rabbitmq_config}")
        host = rabbitmq_config.get("host")
        port = rabbitmq_config.get("port")
        mng_port = rabbitmq_config.get("mng_port")
        base_user = rabbitmq_config.get("user")
        base_password = rabbitmq_config.get("password")

        """
        federation_info = runtime_conf.get("job_parameters", {}).get(
            "federation_info", {}
        )
        union_name = federation_info.get("union_name")
        policy_id = federation_info.get("policy_id")
        """

        # union_name = string_utils.random_string(4)
        # policy_id = string_utils.random_string(10)

        union_name = federation_session_id
        policy_id = federation_session_id

        rabbitmq_run = runtime_conf.get("job_parameters", {}).get("rabbitmq_run", {})
        LOGGER.debug(f"rabbitmq_run: {rabbitmq_run}")
        max_message_size = rabbitmq_run.get(
            "max_message_size", DEFAULT_MESSAGE_MAX_SIZE
        )
        LOGGER.debug(f"set max message size to {max_message_size} Bytes")

        rabbit_manager = RabbitManager(
            base_user, base_password, f"{host}:{mng_port}", rabbitmq_run
        )
        rabbit_manager.create_user(union_name, policy_id)
        route_table_path = rabbitmq_config.get("route_table")
        if route_table_path is None:
            route_table_path = "conf/rabbitmq_route_table.yaml"
        route_table = file_utils.load_yaml_conf(conf_path=route_table_path)
        mq = MQ(host, port, union_name, policy_id, route_table)
        return Federation(
            federation_session_id, party, mq, rabbit_manager, max_message_size
        )
def from_conf ( federation_session_id : str , party : Party , runtime_conf : dict , rabbitmq_config : dict , ) : LOGGER . debug ( f"rabbitmq_config: {rabbitmq_config}" ) host = rabbitmq_config . get ( "host" ) port = rabbitmq_config . get ( "port" ) mng_port = rabbitmq_config . get ( "mng_port" ) base_user = rabbitmq_config . get ( "user" ) base_password = rabbitmq_config . get ( "password" ) # union_name = string_utils.random_string(4) # policy_id = string_utils.random_string(10) union_name = federation_session_id policy_id = federation_session_id rabbitmq_run = runtime_conf . get ( "job_parameters" , { } ) . get ( "rabbitmq_run" , { } ) LOGGER . debug ( f"rabbitmq_run: {rabbitmq_run}" ) max_message_size = rabbitmq_run . get ( "max_message_size" , DEFAULT_MESSAGE_MAX_SIZE ) LOGGER . debug ( f"set max message size to {max_message_size} Bytes" ) rabbit_manager = RabbitManager ( base_user , base_password , f"{host}:{mng_port}" , rabbitmq_run ) rabbit_manager . create_user ( union_name , policy_id ) route_table_path = rabbitmq_config . get ( "route_table" ) if route_table_path is None : route_table_path = "conf/rabbitmq_route_table.yaml" route_table = file_utils . load_yaml_conf ( conf_path = route_table_path ) mq = MQ ( host , port , union_name , policy_id , route_table ) return Federation ( federation_session_id , party , mq , rabbit_manager , max_message_size )