# Copyright (c) 2023, AgiBot Inc.
# All rights reserved.

aimrt:
  plugin:
    plugins:
      - name: mqtt_plugin
        path: ./libaimrt_mqtt_plugin.so
        options:
          broker_addr: tcp://127.0.0.1:1883
          client_id: example_pb_chn_benchmark_publisher
          max_pkg_size_k: 1024
  log:
    core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off
    backends:
      - type: console
  executor:
    executors:
      - name: publish_control_executor
        type: simple_thread
      - name: publish_executor_0
        type: simple_thread
      - name: publish_executor_1
        type: simple_thread
      - name: publish_executor_2
        type: simple_thread
      - name: publish_executor_3
        type: simple_thread
  channel:
    backends:
      - type: mqtt
        options:
          pub_topics_options:
            - topic_name: "(.*)"
              qos: 0
    pub_topics_options:
      - topic_name: "(.*)"
        enable_backends: [mqtt]
  module:
    pkgs:
      - path: ./libpb_chn_pub_pkg.so
        enable_modules: [BenchmarkPublisherModule]
    modules:
      - name: BenchmarkPublisherModule
        log_lvl: INFO

# Module custom configuration
BenchmarkPublisherModule:
  max_topic_number: 4
  bench_plans:
    - channel_frq: 1000
      msg_size: 512
      topic_number: 4
      msg_count: 5000
    - channel_frq: 1000
      msg_size: 4096
      topic_number: 1
      msg_count: 1000
