azure - Hazelcast 实例发现在 azure 应用服务中以嵌入模式运行
问题描述
我有运行在 azure 应用服务中的 hazelcast IMDG 3.11.1 的 Spring Boot 应用,扩展至 4 个实例。
1. build.gradle dependencies
compile 'com.hazelcast:hazelcast-azure:1.2.1'
compile 'com.hazelcast:hazelcast:3.11.1'
compile 'com.hazelcast:hazelcast-spring:3.11.1'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.boot:spring-boot-starter-web'
尝试使用 hazelcast-azure 发现插件
2. hazelcast.xml
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast
xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.10.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>${hazelcast.environment.name}</name>
<password>${hazelcast.environment.password}</password>
</group>
<properties>
<property name="hazelcast.discovery.enabled">true</property>
</properties>
<network>
<port auto-increment="false">5701</port>
<join>
<tcp-ip enabled="false" />
<multicast enabled="false"/>
<aws enabled="false" />
<discovery-strategies>
<!-- class equals to the DiscoveryStrategy not the factory! -->
<discovery-strategy enabled="true" class="com.hazelcast.azure.AzureDiscoveryStrategy">
<properties>
<property name="client-id">${platform.azure.client-id}</property>
<property name="client-secret">${platform.azure.client-secret}</property>
<property name="tenant-id">${platform.azure.client-domain}</property>
<property name="subscription-id">${platform.azure.subscription}</property>
<property name="cluster-id">${hazelcast.environment.name}</property>
<property name="group-name">${hazelcast.environment.name}</property>
</properties>
</discovery-strategy>
</discovery-strategies>
</join>
</network>
...
My Map list
...
</hazelcast>
深入挖掘 azure 插件允许发现专用集群,即 hazelcast 集群的客户端-服务器模式。
是否有任何方法可以为在 azure 应用服务中以嵌入模式运行的 hazelcast 节点启用集群节点发现?
解决方案
@Mr.Arjun,不是现在,但我正在为 Hazelcast 创建一个新版本的 Azure Discovery 插件,它使用 Azure REST API 并且也希望添加此功能(适用于 Hazelcast)。您能否在 hazelcast azure github repo 中为此打开一个 github 问题:https ://github.com/hazelcast/hazelcast-azure
推荐阅读
- excel - 宏不起作用,范围内的空单元格现在为 0
- python - begin_offset 设置为 -1 Google NATURAL LANGUAGE API (entity_extraction)
- xamarin.forms - 错误:无法生成deps.json,可能已经生成了。添加对 Xamarin 表单的服务引用时
- android - Google Maps Nearby Places 仅显示 Toasts
- android - 为什么在 NestedScrollView 临时冻结中设置/更新 RecyclerView.Adapter?
- marklogic - 从 Marklogic 查询结果中删除相关数据
- list - 使用整数列表复制列表元素的 Lisp 程序
- python - Python TensorFlow
- java - Spring JMS concurrency=1 但调用了两个receiveMessage
- sql - 01830. 00000 - “日期格式图片在转换整个输入字符串之前结束”