开源版本5.7.2,启用会话持久化功能后,使用restAPI publish message 报错

环境

  • EMQX 版本:开源版本5.7.2
  • 操作系统版本:docker

重现此问题的步骤

  1. 部署emqx 到 docker,持久化数据到本地
  2. 修改 cluster.hocon 配置文件
authentication = [
  {
    backend = postgresql
    database = dpms
    disable_prepared_statements = false
    enable = true
    mechanism = password_based
    password = "xxx"
    password_hash_algorithm {name = md5, salt_position = disable}
    pool_size = 8
    query = "SELECT password_hash FROM device_authorize where username = ${username} LIMIT 1"
    server = "host.docker.internal:5432"
    ssl {
      ciphers = []
      depth = 10
      enable = false
      hibernate_after = "5s"
      log_level = notice
      reuse_sessions = true
      secure_renegotiate = true
      verify = verify_peer
      versions = [
        "tlsv1.3",
        "tlsv1.2"
      ]
    }
    username = xxxx
  }
]
durable_sessions {
  batch_size = 100
  enable = true
  heartbeat_interval = "5000ms"
  idle_poll_interval = "100ms"
  message_retention_period = "10d"
  session_gc_batch_size = 100
  session_gc_interval = "10m"
}
retainer {
  backend {
    enable = true
    index_specs = [[1, 2, 3], [1, 3], [2, 3], [3]]
    max_retained_messages = 0
    storage_type = disc
    type = built_in_database
  }
  delivery_rate = "1000/s"
  enable = true
  flow_control {
    batch_deliver_limiter {
      client {
        rate = "1000/s"
      }
      rate = infinity
    }
    batch_deliver_number = 1000
    batch_read_number = 1000
  }
  max_payload_size = "1MB"
  msg_clear_interval = "0s"
  msg_expiry_interval = "0s"
  stop_publish_clear_msg = false
}

  1. 重启emqx容器
    4.使用restAPI 调用 emqx 发布消息,接口返回 500
    5.消息仍然会发发布到指定topic

备注:关闭会话持久化后,调用接口发布消息 接口返回正常

日志:
emqx.log.1.zip (935 字节)

hi
已经确认您报告的问题为一个 bug
已经加入 bug 修复列表进行追踪,感谢您的反馈。:rocket: