1

FUSE 和 Camel 的新手。

从 ( https://github.com/jboss-fuse/quickstarts )下载了 CBR 项目,并能够将其作为独立的骆驼项目运行。cbr.xml 如下。这会将 MSG 从 work/cbr/input 目录放到另一个目录中。可以将其作为 mvn camel:run 运行

 <route id="cbr-route">
            <from uri="file:work/cbr/input" />
            <log message="Receiving order ${file:name}" />
            <choice>
                <when>
                    <xpath>/order:order/order:customer/order:country = 'UK'</xpath>
                    <log message="Sending order ${file:name} to the UK" />
                    <to uri="file:work/cbr/output/uk" />
                </when>
                <when>
                    <xpath>/order:order/order:customer/order:country = 'US'</xpath>
                    <log message="Sending order ${file:name} to the US" />
                    <to uri="file:work/cbr/output/us" />
                </when>
                <otherwise>
                    <log message="Sending order ${file:name} to another country" />
                    <to uri="file:work/cbr/output/others" />
                </otherwise>
            </choice>
            <log message="Done processing ${file:name}" />
        </route>
    </camelContext>

但是自述文件说启动 FUSE SEVER 试图理解为什么我需要 FUSE 容器,如果我能够独立运行它

有一个项目要求来自客户端的 Web 服务调用通过 FUSE 使其异步。

假设在这种情况下我不需要保险丝容器

感谢您抽出时间阅读

4

1 回答 1

1

FUSE 是一个容器,就像任何其他容器一样,比如 tomcat,您将代码部署到其中。

如果您有很多集成场景,那么您需要有一个专用服务器来保存和运行所有可部署的。至少这是我的建议。

但是,如果只有少数这样的场景,您可以使用 camel 的强大功能,作为框架,将其用作 Java 代码的支持 jar 并作为独立代码运行。

这意味着您负责处理有关该集成代码的可用性或可伸缩性的请求和问题的数量。

于 2015-04-01T03:38:59.023 回答