链接路由器和方案

发布于 2024-12-14 09:00:36 字数 2847 浏览 0 评论 0原文

我正在尝试像这样使用链接路由器:

<flow name="Something">
    <quartz:inbound-endpoint jobName="eventTimer"
        repeatInterval="2000">
        <quartz:event-generator-job />
    </quartz:inbound-endpoint>
    <chaining-router>
        <jdbc:outbound-endpoint queryKey="selectMules"
            exchange-pattern="request-response" />
        <collection-splitter />
        <vm:outbound-endpoint path="Something"
            exchange-pattern="one-way" />
    </chaining-router>
</flow>

但是,我一直遇到方案错误:

A Fatal error has occurred while the server was running:                     *
* cvc-complex-type.2.4.a: Invalid content was found starting with element      *
* 'chaining-router'.

现在,我已经检查并加载了相关的方案 - 我的方案是:

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:spring="http://www.springframework.org/schema/beans" xmlns:http="http://www.mulesoft.org/schema/mule/http"
    xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
    xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
    xmlns:script="http://www.mulesoft.org/schema/mule/scripting"
    xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
        http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/3.2/mule-quartz.xsd
        http://www.mulesoft.org/schema/mule/scripting  http://www.mulesoft.org/schema/mule/scripting/3.2/mule-scripting.xsd
        http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
        http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd
        http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.2/mule-pattern.xsd
        http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.2/mule-jdbc.xsd
        http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd">

我错过了什么吗?

谢谢!

i am attempting to use a chaining router like so:

<flow name="Something">
    <quartz:inbound-endpoint jobName="eventTimer"
        repeatInterval="2000">
        <quartz:event-generator-job />
    </quartz:inbound-endpoint>
    <chaining-router>
        <jdbc:outbound-endpoint queryKey="selectMules"
            exchange-pattern="request-response" />
        <collection-splitter />
        <vm:outbound-endpoint path="Something"
            exchange-pattern="one-way" />
    </chaining-router>
</flow>

However, i keep gettnig a scheme error:

A Fatal error has occurred while the server was running:                     *
* cvc-complex-type.2.4.a: Invalid content was found starting with element      *
* 'chaining-router'.

Now, i've checked and the relveant scehmes is loaded - my schemes are:

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:spring="http://www.springframework.org/schema/beans" xmlns:http="http://www.mulesoft.org/schema/mule/http"
    xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
    xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
    xmlns:script="http://www.mulesoft.org/schema/mule/scripting"
    xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
        http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/3.2/mule-quartz.xsd
        http://www.mulesoft.org/schema/mule/scripting  http://www.mulesoft.org/schema/mule/scripting/3.2/mule-scripting.xsd
        http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
        http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd
        http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.2/mule-pattern.xsd
        http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.2/mule-jdbc.xsd
        http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd">

Am i missing something??

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无妨# 2024-12-21 09:00:36

链接路由器是一个传统路由器,设计用于与旧服务元素配合使用。在流程中,请使用路由消息处理器

在您的情况下,您不需要任何路由器将内容链接在一起,因为消息处理器会自动链接在流中(假设端点是请求-响应,否则某些调度会异步发生)。

The chaining-router is a legacy router designed to work with the old service element. In flows, use routing message processors instead.

In your case, you don't need any router to chain stuff together as message processors are automatically chained in a flow (provided endpoints are request-response, otherwise some dispatches happen asynchronously).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文