2.5. API 更改


以下 API 已被弃用并从版本 4 中删除:

  • org.apache.camel.ExchangePattern 已删除了 InOptionalOut
  • CamelContext 中移除 getEndpointMap () 方法。
  • 删除了 @FallbackConverter,因为您应该改为使用 @Converter (fallback = true)
  • removed uri 属性 @EndpointInject,@Produce, 和 @Consume 替代 (默认)。例如,@Produce (uri = "kafka:cheese") 应更改为 @Produce ("kafka:cheese")
  • 删除了 @UriEndpoint 上的标签,因为您应该使用 类别
  • 删除了 ProducerTemplate 上的所有 asyncCallback 方法。改为使用 asyncSendasyncRequest
  • Removed org.apache.camel.spi.OnCamelContextStart.改为使用 org.apache.camel.spi.OnCamelContextStarting
  • Removed org.apache.camel.spi.OnCamelContextStop.改为使用 org.apache.camel.spi.OnCamelContextStopping
  • org.apache.camel.ExtendedCamelContextorg.apache.camel.CamelContext 分离。
  • 使用 getCamelContextExtension替换 org.apache.camel.CamelContextadapt ()
  • org.apache.camel.ExtendedExchangeorg.apache.camel.Exchange 分离。
  • 使用 getExchangeExtension替换 org.apache.camel.ExtendedExchangeadapt ()
  • 交换失败处理状态已从定义为 ExchangePropertyKey.FAILURE_HANDLED 的属性移到 ExtendedExchange 的成员,可通过 'isFailureHandled ()'method 访问。
  • org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy 中删除了 DiscardDiscardOldest
  • 删除了 org.apache.camel.builder.SimpleBuilder。在某些情况下,通常在 Camel 内部使用 Java DSL。
  • org.apache.camel.support.IntrospectionSupport 设置为 camel-core-engine,仅供内部使用。最终用户应使用 org.apache.camel.spi.BeanInspection 替代。
  • org.apache.camel.catalog.CamelCatalog 中删除了 archetypeCatalogAsXml 方法。
  • org.apache.camel.health.HealthCheck 方法现在默认为 false,而不是 true
  • org.apache.camel.StreamCache 添加了 位置 方法。
  • 从接口 org.apache.camel.main.Listener 配置 的方法已被删除
  • org.apache.camel.support.EventNotifierSupport abstract 类现在实现了 CamelContextAware
  • CamelContext 上的 dumpRoutes 的类型已从 布尔值 改为 String,以允许指定 xml 或 yaml。
注意

org.apache.camel.support.PluginHelper 提供对以前来自 CamelContext 的 Camel v3 中可用的各种扩展和上下文插件的简单访问。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat