Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.08k stars 1.2k forks source link

I am not able to consume the events in the nestjs #31389

Open noor-xebia opened 2 weeks ago

noor-xebia commented 2 weeks ago

Hey there, I am first time getting my hands dirty with azure-event-hub and started with creating a POC in NodeJS and it worked absolutely fine, the I implementation in the nestjs where I have create a service which has the logic for subscribing and processing the events. I am able to connect to hub however events are not coming. after sometime I get this error.

"OperationTimeoutError: Unable to create the amqp receiver 'pnrfeed.uat/ConsumerGroups/$Default/Partitions/0-5fb4a359-dbfd-40a8-89ed-55c92dca34b8' on amqp session 'local-5_remote-5_connection-1' due to operation timeout."

In am sure I am doing some mistake in nestjs just not able to find it. looking forward for the help. Thanks

github-actions[bot] commented 2 weeks ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kasun04.

deyaaeldeen commented 2 weeks ago

Hi @noor-xebia Thanks for reaching out! Sounds like you have an interesting project there, is there a reason why you are not using Azure Event Hubs directly?

noor-xebia commented 2 weeks ago

@deyaaeldeen we are using azure-event hubs directly, but as our project is in nestjs, we have to use the sdk for that right ? I am using @azure/events-hub library in nestjs.

deyaaeldeen commented 2 weeks ago

@noor-xebia Thanks for sharing and sorry for the confusion. What I meant is that why are you building an Event Hubs Service API-like project instead of using the Azure Event Hubs service directly?

noor-xebia commented 2 weeks ago

@deyaaeldeen I am not building service like event hub, my project is I am consuming the events from hub and then transforming it before storing to db, from where our other services pull the data. I am kust not able to get the events in nestjs, getting this error ""OperationTimeoutError: Unable to create the amqp receiver 'pnrfeed.uat/ConsumerGroups/$Default/Partitions/0-5fb4a359-dbfd-40a8-89ed-55c92dca34b8' on amqp session 'local-5_remote-5_connection-1' due to operation timeout."", while it is working fine in normal nodejs script. could you please help me on this ?

deyaaeldeen commented 1 week ago

Can you confirm you're using the latest version, v5.12.2? Also, could you share logging information?

github-actions[bot] commented 1 week ago

Hi @noor-xebia. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

noor-xebia commented 1 week ago

@deyaaeldeen that issue is fixed after upgrading the version, Thanks for help. we were using v5.12.1, but now the new issue is that when we are deploying to server we are getting this error "MessagingError: read ECONNRESET ", could you guide us what the cause could be ?

deyaaeldeen commented 1 week ago

@noor-xebia I am glad the first issue has been resolved!

Now for the second issue, ECONNRESET is most likely associated with network issues. Could you share more what do you observe? Are you receiving messages before the error? Are there other errors happening before this particular error? It would be great if you enable logging and share the logs with us.

github-actions[bot] commented 1 week ago

Hi @noor-xebia. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] commented 2 days ago

Hi @noor-xebia, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!