Skip to content

how to execute 2 branch components concurrently #3523

@lizhe19

Description

@lizhe19

input:
generate:
mapping: root = {"reqCode":"123456","data":"info"}
interval: 0s
count: 1
pipeline:
processors:
- mapping: |
meta start = timestamp_unix_milli()
- log:
level: INFO
message: 'once requet record start time:${!now().ts_format("2006-01-02 15:04:05")}'
- parallel:
cap: 0
processors:
- branch:
processors:
- http:
headers:
Content-Type: application/json; charset=UTF-8
TEST: test
url: http://172.32.6.25:9357/test/http2
verb: POST
timeout: 30s
parallel: true
- catch:
- log:
level: ERROR
message: "request execption,request body=${!content()}"
- branch:
processors:
- http:
headers:
Content-Type: application/json; charset=UTF-8
TEST: test
url: http://172.32.6.25:9357/test/http3
verb: POST
timeout: 30s
parallel: true
- catch:
- log:
level: ERROR
message: "request execption,request body=${!content()}"
- log:
level: INFO
message: 'once request used time total:${!(timestamp_unix_milli() - metadata("start"))}ms'
output:
stdout: {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions