The documentation you are viewing is for Dapr v1.12 which is an older version of Dapr. For up-to-date documentation, see the latest version.
Hazelcast
关于Hazelcast pubsub组件的详细文档。
配置
要安装 hazelcast pubsub ,请创建一个类型为 pubsub.hazelcast
的组件。 请参阅本指南,了解如何创建和应用 pubsub 配置。
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: hazelcast-pubsub
namespace: default
spec:
type: pubsub.hazelcast
version: v1
metadata:
- name: hazelcastServers
value: "hazelcast:3000,hazelcast2:3000"
Warning
以上示例将密钥明文存储, 更推荐的方式是使用 Secret 组件, 这里。元数据字段规范
字段 | 必填 | 详情 | 示例 |
---|---|---|---|
connectionString | 是 | 逗号分隔的服务器地址 逗号分隔的服务器地址 示例:“hazelcast:3000,hazelcast2:3000” | "hazelcast:3000,hazelcast2:3000" |
backOffMaxRetries | 否 | 返回错误前重试处理消息的最大次数。 默认为 "0" 这意味着组件不会重试处理消息。 "-1" 将无限期重试,直到处理完消息或关闭应用程序。 And positive number is treated as the maximum retry count. The component will wait 5 seconds between retries. |
"3" |
创建Hazelcast 实例
你可以使用Docker在本地运行Hazelcast:
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=127.0.0.1:5701" -p 5701:5701 hazelcast/hazelcast
然后你可以通过127.0.0.1:5701
与服务器交互。
在Kubernetes上安装Hazelcast的最简单方法是使用Helm chart。
相关链接
- Dapr组件的基本格式
- 阅读 本指南,了解配置 发布/订阅组件的说明
- 发布/订阅构建块
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.