第 14 章 Red Hat Decision Manager Red Hat build of Kogito Operator 与 Kafka 交互


Red Hat Decision Manager Red Hat build of Kogito Operator 使用 AMQ Streams Operator 自动配置带有 Kafka 的 Kogito 微服务的红帽构建。

当您通过 KogitoInfra 部署启用基础架构机制时,Red Hat Decision Manager Red Hat Decision Manager 红帽构建的 Kogito Operator 会使用相关的第三方操作器来配置基础架构。

您必须定义自定义基础架构资源,并将其链接到 KogitoInfra 文件中。您可以在 spec.resource.namespec.resource.namespace 配置中指定您的自定义基础架构资源。

Red Hat Decision Manager 红帽为自定义消息构建 Kogito 基础架构资源示例

apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this microservice
kind: KogitoInfra # Application type
metadata:
  name: my-kafka-infra
spec:
  resource:
    apiVersion: kafka.strimzi.io/v1beta2 # AMQ Streams API
    kind: Kafka	# AMQ Streams Application Type
    name: my-kafka-instance
    namespace: my-namespace
Copy to Clipboard Toggle word wrap

在本例中,KogitoInfra 自定义资源从 my-namespace 连接到 my-namespace 的 Kafka 集群 my-kafka-instance,用于事件消息。

要将红帽构建的 Kogito 微服务连接到 Kafka,您需要定义 infra 配置以使用对应的基础架构。

红帽构建带有消息传递的 Kogito 微服务资源配置示例

apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this microservice
kind: KogitoRuntime # Application type
metadata:
  name: example-quarkus # Application name
spec:
  image: <final-image-name> # Kogito image name
  insecureImageRegistry: true # Can be omitted when image is pushed into secured registry with valid certificate
  infra:
  - my-kafka-infra
Copy to Clipboard Toggle word wrap

Red Hat Decision Manager Red Hat build of Kogito Operator 配置必要的属性,以便您的应用程序可以连接到 Kafka 实例。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat