Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache camel 多播()到底做什么?_Apache Camel - Fatal编程技术网

Apache camel 多播()到底做什么?

Apache camel 多播()到底做什么?,apache-camel,Apache Camel,两者的确切区别是什么 from("stream:in") .to("stream:out", "stream:err"); 及 ?在这种情况下-没有真正的区别,因为流驼峰组件的传入消息体似乎总是作为传出消息体向前发送;) 然而,想象一个更为实质性的案例,例如: from("stream:in") .to("direct:one", "direct:two"); 在这种情况下,流上接收到的任何内容都首先发送到routedirect:one。现在,如果该路由以某种方式修改消息(例如set

两者的确切区别是什么

from("stream:in")
.to("stream:out", "stream:err");


在这种情况下-没有真正的区别,因为
驼峰组件的传入消息体似乎总是作为传出消息体向前发送;)

然而,想象一个更为实质性的案例,例如:

from("stream:in")
    .to("direct:one", "direct:two");
在这种情况下,流上接收到的任何内容都首先发送到route
direct:one
。现在,如果该路由以某种方式修改消息(例如
setBody(常量(“修改”)
),则路由
direct:two
将从路由
direct:one
接收修改后的传出消息

可以这样想:
stream:in
->
direct:one
->
direct:two

多播

from("stream:in")
    .multicast()
    .to("direct:one", "direct:two");
与此相反,对于多播,流上接收到的任何内容都首先发送到
direct:one
,并且流中相同的消息体(作为副本)发送到
direct:two
——无论
direct:one
设置为传出消息体的是什么

我们可以这样来考虑多播:

stream:in -----> direct:one
          \----> direct:two

在这种情况下-没有真正的区别,因为
camel组件的传入消息体似乎总是作为传出消息体向前发送;)

然而,想象一个更为实质性的案例,例如:

from("stream:in")
    .to("direct:one", "direct:two");
在这种情况下,流上接收到的任何内容都首先发送到route
direct:one
。现在,如果该路由以某种方式修改消息(例如
setBody(常量(“修改”)
),则路由
direct:two
将从路由
direct:one
接收修改后的传出消息

可以这样想:
stream:in
->
direct:one
->
direct:two

多播

from("stream:in")
    .multicast()
    .to("direct:one", "direct:two");
与此相反,对于多播,流上接收到的任何内容都首先发送到
direct:one
,并且流中相同的消息体(作为副本)发送到
direct:two
——无论
direct:one
设置为传出消息体的是什么

我们可以这样来考虑多播:

stream:in -----> direct:one
          \----> direct:two

啊..微妙。有点像串行与并行电气连接。谢谢你给出了这个详尽的答案。太好了!如果你满意这个答案,你介意接受吗?默认情况下,多播不是并行的;如果你想通过多播进行并发/并行处理,那么你需要启用并行处理。啊..微妙。有点像串行与并行。并行电气连接。感谢您提供了这个详细的答案。太好了!如果您满意,您是否介意接受这个答案?默认情况下,多播不是并行的;如果您希望通过多播进行并发/并行处理,那么您需要启用并行处理。