SpEL won’t work, even juel (which is used in Flowable as expression language) won’t work here, because the channel is static. The problem is that the channel needs to be deployed beforehand right now, to be used and it’s not bound to the instance level, but engine level (hence why variables are not available).
So am I getting you right that you want to dynamically send to a topic, but the recordKey needs to change?
Got you on SpEL, JUEL.
Yes. If the purpose of recordKey prop is for Message Key in Kafka (my usecase), yes bare minimum I wanted to send dynamic String value. Also for greater flexibility, I want to explore dynamic JSON value.
From your explanation of “static nature of channel file”, I feel the right place of recordKey prop is event file.