#接入渠道
inbound_channel:
  values:
  - channelType: inbound
    id: inboundChannel
    inMessagePool: {corePoolSize: 20, keepAliveTime: 60, maximumPoolSize: 50, poolMode: SHARE}
    name: 接入渠道
    started: true
    values:
    - id: inboundConnector
      protocolType: http
      contentType: http-transparent
      port: 18080
      started: true
      type: netty

#接出渠道
outbound_channel:
  values:
#假如有A服务
  - channelType: outbound
    id: AserviceChannel
    name: 接出渠道-http透传
    inMessagePool: {corePoolSize: 15, keepAliveTime: 60, maximumPoolSize: 50, poolMode: SHARE}
    started: true
    values:
    - connectionConfig: {connectTimeoutMills: 3000, useConnectionPool: false}
      id: outboundConnectorA
      contentType: http-transparent
      protocolType: http
      started: true
      type: netty
      uri: http://localhost:8080/aaa
#假如有B服务
  - channelType: outbound
    id: BserviceChannel
    name: 接出渠道-http透传
    inMessagePool: {corePoolSize: 15, keepAliveTime: 60, maximumPoolSize: 50, poolMode: SHARE}
    started: true
    values:
    - connectionConfig: {connectTimeoutMills: 3000, useConnectionPool: false}
      id: outboundConnectorB
      contentType: http-transparent
      protocolType: http
      started: true
      type: netty
      uri: http://localhost:8080/bbb

#路由, 路由到对应的接出渠道
router:
  values:
  - id: router1
    routerMap: {'${projectName}->A': AserviceChannel, '${projectName}->B': BserviceChannel}
    available: true
    type: default
  available: true
  pipeType: direct
  inbound: true

#全局识别器, 比路由先执行, 通过识别器从url或者http头中识别到信息再做路由
recognizer:
  values:
  - id: recognizer2
    keyMap: {host: '${host}', iopName: '${path[0]}', projectName: '${path[1]}', protocolName: '${path[2]}',pathService: '${path[2..]}'}
    type: url
  - id: recognizer4
    keyMap: {pathToken: '${path}'}
    type: url

defaultPipeType: direct
id: gateway-test
name: 测试网关
started: true
