在 Spring Cloud Data Flow 中使用一个源、两个并行处理器和一个接收器创建 Stream [英] Create Stream with one source, two parallel processors and one sink in Spring Cloud Data Flow

查看:20
本文介绍了在 Spring Cloud Data Flow 中使用一个源、两个并行处理器和一个接收器创建 Stream的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用

  1. 一个来源,即订单来源和 Order 消息将发布到 RabbitMQ Topic/Queue.

  1. One source i.e. order-source and Order message will be published to the RabbitMQ Topic/Queue.

两个并行处理器,即产品处理器和装运处理器这两个处理器都将是RabbitMQ Topic/Queue的订阅者并获取Order消息,每个处理器将单独处理这些Order消息并更新Order,Order消息将发布到RabbitMQ Topic/Queue.

Two parallel processors i.e. product-processor and shipment-processor Both of these processors will be subscribers to the RabbitMQ Topic/Queue and gets the Order message and each of them will process these Order message individually and update the Order and the Order message will be published to the RabbitMQ Topic/Queue.

一个接收器,即支付接收器接收器将是 RabbitMQ Topic/Queue 的订阅者,将获得 Order 消息,并根据 Order 消息完成支付过程.

One sink i.e. payment-sink The sink will be the subscriber to the RabbitMQ Topic/Queue and will get the Order message and based on the Order message, will complete the Payment process.

我尝试了以下命令并部署了

I tried the following command and deployed

stream create --name order-to-payment --definition 'order-source |产品处理器|装运处理器|付款接收器'

stream create --name order-to-payment --definition 'order-source | product-processor|shipment-processor | payment-sink'

但在 Spring Cloud Data Flow 中以图形方式显示如下:

But graphically in Spring Cloud Data Flow it looks like as follows:

但我看起来像下面的东西

But I am looking something like below

是否有可能实现这一目标?由于 Spring Cloud Data Flow 不允许它从一个源连接两个处理器,也不能以图形方式从两个处理器连接到一个接收器?

Is it possible to achieve this? As Spring Cloud Data Flow is not allowing it to connect two processors from one source as well as not able to connect from two processor to one sink graphically?

谢谢,大卫.

推荐答案

您可以使用命名目的地让 DAG 与数据流一起使用,请在此处查看:http://docs.spring.io/spring-cloud-dataflow/docs/1.2.2.RELEASE/reference/htmlsingle/#spring-cloud-dataflow-stream-advanced

You can have DAG with dataflow using named destinations, please check it here: http://docs.spring.io/spring-cloud-dataflow/docs/1.2.2.RELEASE/reference/htmlsingle/#spring-cloud-dataflow-stream-advanced

您需要通过指定的目的地发送您的消息,并从这些目的地组成流程.如果您在浏览文档时遇到问题,请告诉我,我可以在此处发布示例.

You will need to send your messages via named destinations and compose the flow from them. Let me know if you have trouble going through the docs and I can post an example here.

这篇关于在 Spring Cloud Data Flow 中使用一个源、两个并行处理器和一个接收器创建 Stream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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