Since the tasklaunchrequest-transform-processor
ignores the incoming payload, in order to accomplish what you are looking for, you need to customize the processor, i.e, you have to change the logic in the processor so that it takes the incoming payload and attaches to the TaskLaunchRequest
somehow. If the incoming payload is a String
type, you can then add that as a environment property or a command line arg in the TaskLaunchRequest
- then essentially pass this modified request down through the stream. Basically, you need to replace your ProcessorP1 with a custom takslaunchrequest-transform-processor
that does this.
See here for some guidelines for patching the out of the box applications:
https://docs.spring.io/spring-cloud-stream-app-starters/docs/current/reference/htmlsingle/#_patching_pre_built_applications
or creating new ones: https://docs.spring.io/spring-cloud-stream-app-starters/docs/current/reference/htmlsingle/#_creating_new_stream_application_starters_and_generating_artifacts
payload
fromProcessor1
. Thepayload
is going to be yourTaskLaunchRequest
which will be carried to thetask-launcher
.tasklaunchrequest-transform
ignores any incoming payload and headers. – sobychackoProcessorP1
takes input fromSource
, it then discards it and creates a newTaskLaunchRequest
which it sends on its output channel. This is then consumed by thetask-launcher
attached at the tap and is also consumed byProcessorP2
. I wanted to know if there is a way to NOT ignore the incoming payload fromSource
and be able to pass that on toProcessorP2
, or include that incoming payload in theTaskLaunchRequest
itself. – Kanika Sharma