@yolo-croket-dev/core 1.7.27 → 1.7.28

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.
@@ -296,7 +296,13 @@ let RPCInterceptor = class RPCInterceptor {
296
296
  .pipe((0, operators_1.timeout)({
297
297
  each: this.DEFAULT_TIMEOUT,
298
298
  with: () => {
299
- msaLogger.error('RPCInterceptor timeout 발생', { traceId: execInterceptor.traceId }, { message: this.DEFAULT_TIMEOUT_MESSAGE });
299
+ msaLogger.error('RPCInterceptor timeout 발생', { traceId: execInterceptor.traceId }, {
300
+ message: this.DEFAULT_TIMEOUT_MESSAGE,
301
+ messagePattern: method,
302
+ durationMs: Date.now() - now,
303
+ reDeliveryCount,
304
+ staticRetryCount,
305
+ });
300
306
  abortController.abort();
301
307
  return (0, rxjs_1.throwError)(() => new exceptions_1.InternalServerError('TIMEOUT_ERROR', this.DEFAULT_TIMEOUT_MESSAGE));
302
308
  },
@@ -318,36 +324,38 @@ let RPCInterceptor = class RPCInterceptor {
318
324
  }),
319
325
  // eslint-disable-next-line consistent-return
320
326
  (0, operators_1.catchError)(async (err) => {
327
+ const isNackMessage = !execInterceptor.isMessageAck;
321
328
  // timeout 에러 처리
322
329
  const isTimeoutError = err instanceof Error && (err.name === 'TimeoutError' || err.message === this.DEFAULT_TIMEOUT_MESSAGE);
323
330
  if (isTimeoutError) {
324
- msaLogger.error('[타임 아웃] 메시지 재전송 처리', { traceId: execInterceptor.traceId }, {
331
+ msaLogger.error(`[타임 아웃] 메시지 감지, ${isNackMessage ? '재전달' : '재전달하지 않음'}처리`, { traceId: execInterceptor.traceId }, {
325
332
  error: {
326
333
  message: err.message,
327
334
  stack: err.stack,
328
335
  name: err.name,
329
336
  response: err.response,
337
+ isNackMessage,
330
338
  },
339
+ messagePattern: method,
331
340
  });
332
- if (!execInterceptor.isMessageAck) {
333
- channel.nack(message, false, true);
334
- execInterceptor.isMessageAck = true;
335
- message.properties.replyTo = undefined; /** replyTo가 존재하면 sendToQueue가 호출되므로, 삭제해주기 */
336
- msaLogger.debug('TimeoutError occurred, message requeued called', { traceId: execInterceptor.traceId });
337
- return new rxjs_1.Observable();
338
- }
339
341
  }
340
342
  else {
341
- msaLogger.error('에러 응답 전송 처리', { traceId: execInterceptor.traceId }, {
343
+ msaLogger.error(`에러 응답 전송 처리, ${isNackMessage ? '재전달' : '재전달하지 않음'}처리`, { traceId: execInterceptor.traceId }, {
342
344
  error: {
343
345
  message: err.message,
344
346
  stack: err.stack,
345
347
  name: err.name,
346
348
  response: err.response,
347
349
  },
350
+ messagePattern: method,
348
351
  });
349
- return new rxjs_1.Observable();
350
352
  }
353
+ if (!execInterceptor.isMessageAck) {
354
+ channel.nack(message, false, true);
355
+ execInterceptor.isMessageAck = true;
356
+ message.properties.replyTo = undefined; /** replyTo가 존재하면 sendToQueue가 호출되므로, 삭제해주기 */
357
+ }
358
+ return new rxjs_1.Observable();
351
359
  }), (0, operators_1.finalize)(() => {
352
360
  this.gracefulShutdownService.popActiveInterceptors(execInterceptor);
353
361
  abortController.abort();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/core",
3
- "version": "1.7.27",
3
+ "version": "1.7.28",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",