132.7. 使用作为 Producer 端点
当 SSH 组件用作 Producer ('.to ("ssh://…")' 时,它将消息正文作为命令发送,以便在远程 SSH 服务器上执行。
XML DSL 示例
请注意,命令有一个 XML 编码的新行(' ')。
<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>