修复Pulsar设置TTL异常,完善本地缓存更新消息

This commit is contained in:
ChenYi 2025-11-17 15:21:24 +08:00
parent a37f02f4b9
commit 3bd36c65c9
4 changed files with 28 additions and 12 deletions

View File

@ -31,6 +31,7 @@
"UserName": "admin",
"TenantName": "1YMVZZkAkRArjxSD8457",
"Namespace": "OneNET",
"MessageTTL": 3600,
"PulsarSecretKey": "0fd7afb8b0d04e6abc4fdfdac2190a79",
"PulsarSubscriptionCustomName": "sub",
"EnableTls": false,

View File

@ -252,6 +252,7 @@ services:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --user=mysql # 确保MySQL以mysql用户运行
- --binlog-expire-logs-seconds=604800 # 设置binlog保留7天7*24*60*60=604800秒
deploy:
resources:
limits:

View File

@ -204,6 +204,7 @@ services:
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --binlog-expire-logs-seconds=604800 # 设置binlog保留7天7*24*60*60=604800秒
deploy:
resources:
limits:

View File

@ -53,18 +53,31 @@
"Pulsar": {
"ServiceUrl": "pulsar+ssl://iot-north-mq.heclouds.com:6651",
"WebUrl": "http://localhost:8080",
"EnableFilter": true,
"EnableAuthorization": true,
"EnableIoTAuth": true,
"EnableTls": null,
"TlsCertificatePath": null,
"TlsPrivateKeyPath": null,
"ValidateServerCertificate": null,
"NumPartitions": 30,
"TaskThreadCount": 4,
"IoTAccessId": "your_project_access_id",
"IoTSecretKey": "your_project_secret_key",
"IsSubscriber": true
"UserName": "admin",
"TenantName": "1YMVZZkAkRArjxSD8457",
"Namespace": "OneNET",
"MessageTTL": 360,
"PulsarSecretKey": "0fd7afb8b0d04e6abc4fdfdac2190a79",
"PulsarSubscriptionCustomName": "sub4",
"EnableTls": false,
"ValidateServerCertificate": false,
"ConnectionTimeout": 30,
"OperationTimeout": 30,
"KeepAliveInterval": 30,
"TaskThreadCount": 8,
"IsSubscriber": true,
"DefaultPartitions": 16,
"DefaultBundles": 16,
"EnableAutoCreation": true, //Topic
"TopicMode": "Static", //Dynamic
"EnableTopicTypeFilter": true, //Topic
"AllowedTopicTypes": [ "Static" ], //Topic
"AllowedClusters": [ "pulsar-cluster-1" ], //
"AdminRoles": [ "admin" ],
"EnableConsumerIdleCleanup": true,
"ConsumerIdleCleanupMinutes": 120,
"EnableProducerIdleCleanup": true,
"ProducerIdleCleanupMinutes": 60
},
"IoTDBOptions": {
"UserName": "root",