spring integration - How to concatenate a string with SpEL in SpringXD Stream Definition -
i'm trying create stream definition uses 2 payload fields joined create concatenated string.
stream create --name blah --definition "http | gemfire-json-server --keyexpression=payload.getfield('deviceid') + payload.getfield('timestamp')" --deploy`
the concatenation piece in keyexpression
incorrect, should work inline?
the simplest answer based on fact string has concat()
method. so, code may like:
--keyexpression=payload.getfield('deviceid').concat(payload.getfield('timestamp'))
from other side, here quote xd reference manual:
it necessary quote parameter values if contain spaces or | character. here transform processor module being passed spel expression applied data encounters:
transform --expression='new stringbuilder(payload).reverse()'
and find chapter, please, more information quotes.
Comments
Post a Comment