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
payloadfromProcessor1. Thepayloadis going to be yourTaskLaunchRequestwhich will be carried to thetask-launcher.tasklaunchrequest-transformignores any incoming payload and headers. - sobychackoProcessorP1takes input fromSource, it then discards it and creates a newTaskLaunchRequestwhich it sends on its output channel. This is then consumed by thetask-launcherattached at the tap and is also consumed byProcessorP2. I wanted to know if there is a way to NOT ignore the incoming payload fromSourceand be able to pass that on toProcessorP2, or include that incoming payload in theTaskLaunchRequestitself. - Kanika Sharma