## pubsub

### 配置选项

- **middleware**: 用于实现Pub/Sub功能的中间件。 （选择 `redis` 或 `redisCluster`）
- **host**: Redis服务器的主机名（当middleware为 `redis` 时使用）
- **port**: Redis服务器的端口号（当middleware为 `redis` 时使用）
- **nodes**: Redis集群节点信息（当middleware为 `redisCluster` 时使用）
  - 示例：
    ```json
    [
      { "host": "endpoint1", "port": 6379 },
      { "host": "endpoint2", "port": 6379 }
    ]
    ```
- **options**: Redis或Redis集群的附加选项

### 默认配置示例

```javascript
module.exports = {
  pubsub: {
    middleware: 'redis',
    host: 'redis',
    port: 6379,
    options: {
      // Redis的附加选项
    }
  }
}
```

```javascript
module.exports = {
  pubsub: {
    middleware: 'redisCluster',
    nodes: [
      { host: 'endpoint1', port: 6379 },
      { host: 'endpoint2', port: 6379 }
    ],
    options: {
      // Redis集群的附加选项
    }
  }
}
```
