将 Scala 与 Apache Camel 结合使用是否存在已知问题?

发布于 2024-09-30 19:21:06 字数 211 浏览 2 评论 0原文

我知道 Camel 有受支持的 Scala DSL。除此之外,

  • 对于基于 Camel 的项目,用 Scala 完全取代 Java(语言)是否现实?

  • 已知存在哪些类型的已知问题?

  • 对于这些问题存在哪些解决方法(除了使用 Java 之外)?

我主要是寻找更少的样板代码。

I know that there is a supported Scala DSL for Camel. Apart from that

  • Is it realistic to replace Java (the language) completely by Scala for a Camel based project?

  • Which kind of known problems are known to exist?

  • Which workarounds exist for those problems (other than using Java)?

I am mainly looking for less boilerplaty code.

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

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

发布评论

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

评论(3

梦幻之岛 2024-10-07 19:21:06

Akka 提供稳定的 Scala 惯用Camel 集成

akka-camel模块允许演员,
无类型演员和有类型演员
通过很棒的方式接收和发送消息
各种协议和 API。这
部分简要概述了
akka-camel 背后的总体思路
模块,其余部分进入
细节。除了本土的
Scala 和 Java actor API,actor 可以
现在与其他人交换消息
包含大量协议的系统
以及 HTTP、SOAP、TCP、FTP 等 API,
SMTP 或 JMS 等等。在
时刻,大约 80 个协议和
支持 API。

除此之外,我确信由于良好的互操作性,这种替换是可能的,而且几乎不可能有任何不是 Java 所特有的 Scala 特定问题。例如,用于发布到 Camel 端点/从 Camel 端点消费的 Akka Actors 是基于 java.util.concurrency,我能想到的唯一问题是库中的一个可修复的错误。

Akka offers stable Scala-idiomatic Camel integration.

The akka-camel module allows actors,
untyped actors and typed actors to
receive and send messages over a great
variety of protocols and APIs. This
section gives a brief overview of the
general ideas behind the akka-camel
module, the remaining sections go into
the details. In addition to the native
Scala and Java actor API, actors can
now exchange messages with other
systems over large number of protcols
and APIs such as HTTP, SOAP, TCP, FTP,
SMTP or JMS, to mention a few. At the
moment, approximately 80 protocols and
APIs are supported.

Apart from that, I'm sure this replacement is possible due to a good interop, and there could hardly be any Scala-specific issues that are not peculiar to Java. E.g., Akka Actors used for publishing to/consuming from Camel endpoints are based on java.util.concurrency, and the only problem I can think of is a fixable bug in the library.

心欲静而疯不止 2024-10-07 19:21:06

与此同时,已经为 Camel 开发了一个相对简单的 Scala DSL应该具有以下功能Java DSL

要确定它对您是否现实,请考虑:
- 语言IDE 支持的质量
- Scala 语言的复杂性
- Scala/Java 语言的流行
- DSL 扩展的可能性。在 Scala 中,应该可以(使用一些 Scala 魔法)扩展 DSL(添加额外的 DSL 元素)。

如果您决定尝试一下,那么如果您与 Apache Camel 社区分享您的经验和印象,那就太好了:
代码可读性代码可维护性代码效率开发人员满意度代码大小“人日”的数量。

In the meantime a relatively simple Scala DSL has been developed for Camel, that should have the functionality of the Java DSL.

To decide if it is realistic for you, consider:
- The quality of the IDE support for the languages
- The Scala language complexity
- The Scala/Java language popularity
- DSL extension possibilities. In Scala, it should be possible (with some Scala magic) to to extend the DSL (add additional DSL elements)

If you decide to try it out, it would be great if you share your experience with the Apache Camel community your impressions on:
code readability, code maintainability, code efficiency, developer satisfaction, code size, the number of "man-days".

奶茶白久 2024-10-07 19:21:06

从那时起(2010-2011 年),现在(2016 年 9 月)出现了一项名为 Akka Streams Integration 的最新计划,代号为 Alpakka

我们相信 Akka Streams 可以成为构建 Apache Camel 的现代替代品的工具。这不会在一夜之间自然发生,我们呼吁社会各界加入我们的行列。 Camel 最大的资产是其丰富的端点组件。我们希望看到为 Akka Streams 开发类似的端点。

请参阅“akka/akka-stream-contrib”。

Since then (2010-2011), there is now (Sept 2016) a recent initiative named for Akka Streams Integration, codename Alpakka.

We believe that Akka Streams can be the tool for building a modern alternative to Apache Camel. That will not happen by itself overnight and this is a call for arms for the community to join us on this mission. The biggest asset of Camel is its rich set of endpoint components. We would like to see that similar endpoints are developed for Akka Streams.

See "akka/akka-stream-contrib".

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