yr.datasystem.stream_client.StreamClient.subscribe

yr.datasystem.stream_client.StreamClient.subscribe#

yr.datasystem.stream_client.StreamClient.subscribe(stream_name, sub_name, subscription_type)#

创建消费者,创建消费者时会创建流。

参数:
  • stream_name (str) - 指定流的名称, 用于创建消费者。

  • sub_name (str) - 订阅名称。

  • subscription_type (int) - 流缓存消费者订阅模式。

返回:
异常:
  • TypeError - 输入参数存在非法值。

  • RuntimeError - 创建消费者失败。