在 apache camel 中的处理器之间传递值 [英] Passing values between processors in apache camel

查看:25
本文介绍了在 apache camel 中的处理器之间传递值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 apache camel 中,哪些是将值从交换处理器传递到另一个处理器的最佳方式(以及为什么):

In apache camel, which of those is the best way to pass values from an exchange processor to another (and why) :

  • 将其存储在交换标头中
  • 在构建路由时使用 setProperty 方法.
  • 另一种方式..

推荐答案

属性和标题几乎相同.但是,在某些组件(例如 Jms)上,标头会与协议特定标头相互转换.所以,

Properties and headers are pretty much the same. Headers are, however, converted to/from protocol specific headers on certain components, such as Jms. So,

  • 路由内的元数据:属性
  • 往/返外部的元数据:标题

这篇关于在 apache camel 中的处理器之间传递值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆