【问题标题】:Understanding Enterprise Integration for Scatter Gather?了解 Scatter Gather 的企业集成?
【发布时间】:2018-12-27 20:13:59
【问题描述】:

我希望更好地了解流行的 EIP 分散集合中的多个拆分器、转换器和聚合方法。

用例是我发送一些可以对应于多种不同类型的 XML。我想拆分标题中指定的类型(每种类型不同)并通过与每种类型对应的特定转换器运行它。

在 Camel 中有没有很好的例子来做这样的事情?

伪代码思路

RouteBuilder to process the input XML

Split on the type

Dynamically redirect to proper splitter based on type

Dynamically redirect to proper transformer based on type

Aggregate

Return response

【问题讨论】:

    标签: java spring apache apache-camel enterprise-integration


    【解决方案1】:

    是的,无论您想要实现什么,都可以使用骆驼实现。我无法为您提供完整的设置,但可以帮助您完成每个过程。

    --RouteBuilder 处理输入的 XML : File Process 参考这将帮助您从特定目录读取文件。

    --拆分类型:Splitter 使用 xpath 可以选择类型。

    --根据类型动态重定向到适当的转换器:Data format 基于数据格式,您可以编组/取消编组任何类型的数据。

    --聚合:Aggregate

    --返回响应:一旦完成上述操作,您就可以完成之后要做的任何事情。

    【讨论】:

      猜你喜欢
      • 2020-05-07
      • 2022-01-16
      • 2018-01-20
      • 2019-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多