@onlineapps/conn-orch-registry 1.1.15 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-registry",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "license": "MIT",
5
5
  "description": "Connector-registry-client provides the core communication mechanism for microservices in this environment. It enables them to interact with a services_registry to receive and fulfill tasks by submitting heartbeats or their API descriptions.",
6
6
  "keywords": [
package/src/config.js CHANGED
File without changes
package/src/events.js CHANGED
File without changes
package/src/index.js CHANGED
File without changes
File without changes
@@ -123,10 +123,20 @@ class ServiceRegistryClient extends EventEmitter {
123
123
  // Handle registration response from registry
124
124
  // Registry sends 'register.confirmed' after validation
125
125
  if ((payload.type === 'registerResponse' || payload.type === 'register.confirmed') && payload.requestId) {
126
+ console.log(`[RegistryClient] ${this.serviceName}: Received ${payload.type} message`, {
127
+ requestId: payload.requestId,
128
+ hasPendingRegistrations: !!(this.pendingRegistrations),
129
+ pendingCount: this.pendingRegistrations ? this.pendingRegistrations.size : 0,
130
+ hasMatchingRequest: !!(this.pendingRegistrations && this.pendingRegistrations.has(payload.requestId)),
131
+ pendingKeys: this.pendingRegistrations ? Array.from(this.pendingRegistrations.keys()) : []
132
+ });
133
+
126
134
  if (this.pendingRegistrations && this.pendingRegistrations.has(payload.requestId)) {
127
135
  const { resolve } = this.pendingRegistrations.get(payload.requestId);
128
136
  this.pendingRegistrations.delete(payload.requestId);
129
137
 
138
+ console.log(`[RegistryClient] ${this.serviceName}: ✓ Resolving registration promise for requestId: ${payload.requestId}`);
139
+
130
140
  // Resolve the registration promise with the response
131
141
  resolve({
132
142
  success: payload.success || false,
@@ -137,6 +147,8 @@ class ServiceRegistryClient extends EventEmitter {
137
147
  validated: payload.validated || payload.success, // Consider successful registration as validated
138
148
  certificate: payload.certificate || null // Include certificate from Registry
139
149
  });
150
+ } else {
151
+ console.warn(`[RegistryClient] ${this.serviceName}: ⚠️ Received ${payload.type} with requestId ${payload.requestId}, but no matching pending registration found`);
140
152
  }
141
153
  }
142
154
 
@@ -218,11 +230,14 @@ class ServiceRegistryClient extends EventEmitter {
218
230
 
219
231
  // Send registration message to registry
220
232
  await this.queueManager.channel.assertQueue(this.registryQueue, { durable: true });
233
+ console.log(`[RegistryClient] ${this.serviceName}: Sending registration message to queue: ${this.registryQueue}`);
234
+ console.log(`[RegistryClient] ${this.serviceName}: Message type: ${msg.type}, serviceName: ${msg.serviceName}, version: ${msg.version}`);
221
235
  this.queueManager.channel.sendToQueue(
222
236
  this.registryQueue,
223
237
  Buffer.from(JSON.stringify(msg)),
224
238
  { persistent: true }
225
239
  );
240
+ console.log(`[RegistryClient] ${this.serviceName}: ✓ Registration message sent, waiting for response...`);
226
241
 
227
242
  this.emit('registerSent', msg);
228
243
 
File without changes