Q:

spring-cloud-starter-stream-sink-sftp Sftp Sink , file-expression is not working

I am using stfp sink and trying to name the remote file based on header. I am providing following property to name the file on remote
sftp.file-expression=payload.headers['id'] + payload.headers['file_name']
I also tried
sftp.file-expression=headers['id'] + headers['file_name']
but these is not working and in remote the original filename is kept. Is this the right way to write SpEL expression. Also I don't get any error with this property except the prope

A:

Must be sftp.filename-expression:

sftp.filename-expression
          A SpEL expression to generate the remote file name. (Expression, default: <none>)

http://docs.spring.io/spring-cloud-stream-app-starters/docs/Bacon.RELEASE/reference/html/spring-cloud-stream-modules-sinks.html#_options_50

