327.4. 使用 作为 Producer 端点
当 SSH 组件用作 Producer (.to ("ssh://…")时,它将发送消息正文作为要在远程 SSH 服务器上执行的命令。
以下是 XML DSL 中的示例。请注意,该命令具有 XML 编码的换行符( 和#10;)。
<route id="camel-example-ssh-producer">
<from uri="direct:exampleSshProducer"/>
<setBody>
<constant>features:list </constant>
</setBody>
<to uri="ssh://karaf:karaf@localhost:8101"/>
<log message="${body}"/>
</route>