@yolo-croket-dev/core 1.7.18-slowquery.2 → 1.7.18-slowquery.3
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.
|
@@ -257,14 +257,12 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
257
257
|
&& err.isRetry !== false) {
|
|
258
258
|
/** 재시도 로직이 필요한 경우, 0보다 커야 정의된것. 기본값이 0, isRetry값이 false로 정의된 에러가 아니라면 전부 재시도 */
|
|
259
259
|
if (reDeliveryCount <= (staticRetryCount - 1)) { /** 재시도 횟수가 있고, 재시도 횟수보다 적을 경우, 0부터 카운팅 되므로 -1 */
|
|
260
|
-
console.log('RETRY 재처리');
|
|
261
260
|
message.properties.headers['x-requeue-reason'] = 'RETRY';
|
|
262
261
|
channel.nack(message, false, true);
|
|
263
262
|
message.properties.replyTo = undefined; /** replyTo가 존재하면 sendToQueue가 호출되므로, 삭제해주기 */
|
|
264
263
|
isAck = true;
|
|
265
264
|
}
|
|
266
265
|
else {
|
|
267
|
-
console.log('DLQ 전달');
|
|
268
266
|
const dlqMessage = JSON.stringify(abstractAmqpHandlerData);
|
|
269
267
|
channel.sendToQueue(message.properties.replyTo, Buffer.from(dlqMessage), { correlationId: message.properties.correlationId });
|
|
270
268
|
message.properties.headers['x-requeue-reason'] = 'DLQ-FORWARD';
|
|
@@ -354,8 +352,7 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
354
352
|
msaLogger.error('Timeout occurred, requeuing message', { traceId: execInterceptor.traceId }, { error: err });
|
|
355
353
|
// 메시지를 Requeue
|
|
356
354
|
channel.nack(message, false, true);
|
|
357
|
-
|
|
358
|
-
throw err;
|
|
355
|
+
message.properties.replyTo = undefined; /** replyTo가 존재하면 sendToQueue가 호출되므로, 삭제해주기 */
|
|
359
356
|
}), (0, operators_1.finalize)(() => {
|
|
360
357
|
this.gracefulShutdownService.popActiveInterceptors(execInterceptor);
|
|
361
358
|
}));
|