从您的通用描述中不清楚最佳方法是什么。有两种选择:
扇动到获取和发布
http | groovy-transform > :request :request > httpclient-get |log :request > httpclient-post|log
http | groovy-transform > :request
:request > httpclient-get |log
:request > httpclient-post|log
流可以连接:
http | groovy-transform > :request :request > httpclient-get > :response :request > httpclient-post > :response :response > log
请注意,如果您使用kafka绑定器和kafka< 0.11客户端,需要明确启用 自定义标题 : 例如:
stream create hetest --definition "time | header-enricher --headers=foo='bar' | log --expression=headers" stream deploy hetest --properties "app.*.spring.cloud.stream.kafka.binder.headers=foo"