How could I use message headers to set properties like host
, user
, password
, etc in the SessionFactory
? Is it possible?
In my case, these data are retrieved from database and stored as message headers.
See the dynamic-ftp sample - it creates a sub-flow for each destination and uses a dynamic router.
This answer and it's follow up have examples using java configuration (albeit for mail adapters rather than FTP).