New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm encountering an "Unexpected close" error & rabbitMq getting disconnected #59
Comments
Hi, The issue exists when the library is trying to publish to dlq. One possible reason could be that you overwrite handleError without calling super.handleError. Can you try calling super.handleError(err, msg); and see if the error persists? |
Hi @nikostoulas Implement as you suggested
but still getting same issues
|
Hi @kundan8239 , async addToDLQ(retries, msg: amqp.Message, ack) {
try {
const correlationId = this.getCorrelationId(msg);
const event = decode(msg);
this.logger.warn(`[${correlationId}] Adding to dlq: ${this.dlqName} after ${retries} retries`);
await this.rabbit.publish(this.dlqName, event, msg.properties);
const response = await this.afterDlq({ msg, event });
ack(msg.properties.headers.errors.message, response);
} catch (err) {
this.logger.error(err);
await this.rabbit.publish(this.dlqName, msg.content.toString(), msg.properties);
ack(err.message, null);
}
} Try commenting out lines to see which one produces the error. Most probably something that is published with |
Hi @nikostoulas Which ### decode function you are referring here it's coming from some library or we have support for decode function. Even after attempting without the decode function, I couldn't capture any information relevant to the error. The error is being caught only after RabbitMQ gets disconnected. Anything related to heartbeat I have to takecare as suggest by amqlib here |
Hi @kundan8239, Decode is this https://github.com/Workable/rabbit-queue/blob/master/ts/encode-decode.ts#L8. |
Hi @nikostoulas tried with commenting
|
Hi @kundan8239 , The error you posted doesn't seem the same as before. |
Hi @nikostoulas , The issue remains the same - 'unexpected close.' Max execution time problems are custom issues that we manually trigger. You can view the complete code [here] |
Hi @kundan2403 , I don't believe this is the library's issue but your implementation's. Have you tried the suggestions regarding heartbeat from my previous message? |
I'm am currently utilizing the rabbit-queue library for establishing a connection with RabbitMQ. However, I've encountered an issue marked by the error message "Unexpected close." I have a worker basically which task is to find different technology & dns info for domain with help of wappalyzer here is my code & env detail shared error log as well, it's quite difficult to to find from where this issues is coming it's comming from rabbit-queue, amqplib , mycode or wapplaizer
Library Version: 5.5.0
Environment: ubuntu 18
Node Version: v18.2.0
wappalyzer.js
baseworker.js
content.js
key heightlight [wappalyzerResult] = await Promise.allSettled([wappalyzerBase(target)]); is giving timeout error
outputlog log:
The text was updated successfully, but these errors were encountered: