aedes-persistence-mongodb
Advanced tools
+16
-0
@@ -168,2 +168,5 @@ 'use strict' | ||
| } | ||
| if (idx.unique) { | ||
| indexOpts.unique = true | ||
| } | ||
| await this.#cl[idx.collection].createIndex(idx.key, indexOpts) | ||
@@ -192,2 +195,15 @@ } | ||
| name: 'query_clientId_messageId' | ||
| }, | ||
| { | ||
| // storeRetained / createRetainedStreamCombi key off `topic`. Without | ||
| // this index every operation falls back to COLLSCAN; under load | ||
| // storeRetained's ordered bulkWrite serializes the whole publish | ||
| // pipeline behind it, stalling broker.publish callbacks by tens of | ||
| // seconds on deployments with more than a few thousand retained | ||
| // topics (observed: ~60s uniform lag with 15k retained + 200 msg/s). | ||
| // Unique matches the {topic}-filtered upsert semantics. | ||
| collection: 'retained', | ||
| key: { topic: 1 }, | ||
| name: 'query_topic', | ||
| unique: true | ||
| } | ||
@@ -194,0 +210,0 @@ ] |
+1
-1
| { | ||
| "name": "aedes-persistence-mongodb", | ||
| "version": "9.4.1", | ||
| "version": "9.4.2", | ||
| "description": "MongoDB persistence for Aedes ", | ||
@@ -5,0 +5,0 @@ "main": "persistence.js", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
26486
2.74%604
2.72%3
200%