Yes; if you use
Code:
<header-enricher input-channel="replyChannelInput" output-channel="echoInput">
<priority value="2"/>
</header-enricher>
You get an Integer. But if you do what the OP did
Code:
<header-enricher input-channel="in" output-channel="out">
<header name="priority" value="7"/>
</header-enricher>
You get a String (you can fix this with an expression).
Given that we have a well-known header <priority/>, that works correctly (aside from the schema issue), that is a better way to solve the issue than using an expression.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware