116.13. 使用 toD
如果您需要发送消息到大量不同的交换,您必须重复使用端点并指定动态目的地(使用 toD )。
例如,您需要向交换发送带有订购类型的信息,然后您可以使用 toD
,如下所示:
from("direct:order") .toD("spring-rabbit:order-${header.orderType}");
from("direct:order")
.toD("spring-rabbit:order-${header.orderType}");