
openmf/ph-ee-connector-channelChannel Connector 是一个轻量级通道连接器镜像,旨在实现不同系统、服务或应用之间的高效通信与数据交换。作为中间件组件,它能够适配多种通信协议,简化跨平台、跨服务的集成流程,减少系统间直接耦合,提升架构灵活性。
bashdocker run -d \ --name channel-connector \ -p 8080:8080 \ -e CONNECTOR_PROTOCOL=http \ -e TARGET_ENDPOINT=[***] \ channel-connector:latest
-p 8080:8080:映射容器内 HTTP 服务端口到主机(默认端口可通过 PORT 环境变量修改)。-e CONNECTOR_PROTOCOL:指定连接器使用的协议(可选值:http、mqtt、tcp 等)。-e TARGET_ENDPOINT:目标服务的连接地址(如 mqtt://broker.example.com:1883、tcp://192.168.1.100:5000)。| 环境变量名 | 描述 | 默认值 | 可选值范围 |
|---|---|---|---|
PORT | 连接器服务监听端口 | 8080 | 1-65535 |
CONNECTOR_PROTOCOL | 通信协议 | http | http, https, mqtt, tcp, udp |
TARGET_ENDPOINT | 目标服务端点地址 | - | 根据协议填写(如 URL、IP:端口) |
RECONNECT_INTERVAL | 连接断开后重连间隔(秒) | 10 | 1-300 |
LOG_LEVEL | 日志级别 | info | debug, info, warn, error |
AUTH_ENABLED | 是否启用身份验证 | false | true, false |
AUTH_TOKEN | 身份验证令牌(AUTH_ENABLED=true 时必填) | - | 字符串 |
如需复杂配置(如多通道配置、数据转换规则等),可通过挂载配置文件实现。配置文件为 YAML 格式,示例如下:
yamlconnectors: - name: http-to-mqtt protocol: http port: 8080 target: protocol: mqtt endpoint: mqtt://broker.example.com:1883 topic: data/upload transform: inputFormat: json outputFormat: json mapping: "timestamp": "${timestamp}" "value": "${payload.temp}" - name: tcp-to-http protocol: tcp port: 5000 target: protocol: https endpoint: [***] method: POST
bashdocker run -d \ --name channel-connector \ -p 8080:8080 \ -p 5000:5000 \ -v $(pwd)/config.yaml:/app/config.yaml \ -e CONFIG_FILE=/app/config.yaml \ channel-connector:latest
yamlversion: '3.8' services: channel-connector: image: channel-connector:latest container_name: channel-connector ports: - "8080:8080" - "5000:5000" environment: - LOG_LEVEL=debug - AUTH_ENABLED=true - AUTH_TOKEN=your-secure-token volumes: - ./config.yaml:/app/config.yaml restart: unless-stopped
AUTH_ENABLED=true),并使用 HTTPS、TLS 等加密通信协议。manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务