service_name: activity-service
node_id: activity-docker
environment: local
log:
  level: info
  format: json
  include_request_body: false
  include_response_body: false
  max_payload_bytes: 2048
grpc_addr: ":13006"
health_http_addr: ":13106"
mysql_dsn: "hyapp:hyapp@tcp(mysql:3306)/hyapp_activity?parseTime=true&charset=utf8mb4&loc=UTC"
user_service_addr: "user-service:13005"
wallet_service_addr: "wallet-service:13004"
room_service_addr: "room-service:13001"
mysql_auto_migrate: true
first_recharge_reward_worker:
  enabled: true
cumulative_recharge_reward_worker:
  enabled: true
invite_activity_reward_worker:
  enabled: true
red_packet_broadcast_worker:
  enabled: true
task_event_worker:
  enabled: true
user_leaderboard_worker:
  enabled: true
  redis_addr: "redis:6379"
  redis_password: ""
  redis_db: 0
  key_prefix: "activity:user_leaderboard"
message_action_confirm_worker:
  enabled: true
  outbox_poll_interval: "1s"
  outbox_batch_size: 100
  outbox_lock_ttl: "30s"
  outbox_max_retry: 8
  publish_timeout: "5s"
lucky_gift_worker:
  enabled: true
  worker_poll_interval: "1s"
  worker_batch_size: 100
  worker_concurrency: 8
  worker_lock_ttl: "30s"
  worker_max_retry: 8
  publish_timeout: "5s"
  stats_refresh_interval: "10m"
  stats_batch_size: 5000
tencent_im:
  # Docker 本地联调全局/区域播报群；必须与 gateway/room-service 使用同一组腾讯 IM 应用配置。
  enabled: true
  sdk_app_id: 20040101
  secret_key: "2f6a5ec58cccf79647557a96c15e6efe89ba5a44c474096bde2589a633fcd45e"
  admin_identifier: "administrator"
  admin_user_sig_ttl: "24h"
  endpoint: "adminapisgp.im.qcloud.com"
  group_type: "ChatRoom"
  group_id_prefix: "test_"
  request_timeout: "5s"
broadcast:
  enabled: true
  super_gift_min_value: 100000
  worker_poll_interval: "1s"
  worker_batch_size: 100
  worker_lock_ttl: "30s"
  worker_max_retry: 8
  ensure_groups_on_startup: true
rocketmq:
  # Docker 测试环境使用 compose RocketMQ 消费 wallet_outbox 红包事实。
  enabled: true
  name_servers: ["rocketmq-namesrv:9876"]
  name_server_domain: ""
  access_key: ""
  secret_key: ""
  namespace: ""
  room_outbox:
    enabled: true
    topic: "hyapp_room_outbox"
    consumer_group: "hyapp-activity-room-outbox"
    consumer_max_reconsume_times: 16
  wallet_outbox:
    enabled: true
    topic: "hyapp_wallet_outbox"
    realtime_topic: "hyapp_wallet_realtime_outbox"
    first_recharge_consumer_group: "hyapp-activity-first-recharge-wallet-outbox"
    cumulative_recharge_consumer_group: "hyapp-activity-cumulative-recharge-wallet-outbox"
    invite_activity_consumer_group: "hyapp-activity-invite-wallet-outbox"
    red_packet_broadcast_consumer_group: "hyapp-activity-red-packet-wallet-outbox"
    task_consumer_group: "hyapp-activity-task-wallet-outbox"
    user_leaderboard_consumer_group: "hyapp-activity-user-leaderboard-wallet-outbox"
    consumer_max_reconsume_times: 16
  user_outbox:
    enabled: true
    topic: "hyapp_user_outbox"
    consumer_group: "hyapp-activity-user-region-broadcast"
    task_consumer_group: "hyapp-activity-task-user-outbox"
    invite_activity_consumer_group: "hyapp-activity-invite-user-outbox"
    message_action_consumer_group: "hyapp-activity-message-action-user-outbox"
    consumer_max_reconsume_times: 16
  message_action_outbox:
    enabled: true
    topic: "hyapp_message_action_outbox"
    producer_group: "hyapp-activity-message-action-outbox"
    send_timeout: "5s"
    retry: 2
consumer:
  room_outbox_poll_interval_ms: 1000
  batch_size: 100
message_inbox:
  unread_cache_ttl: "60s"
