question

SanthoshS-5826 avatar image
0 Votes"
SanthoshS-5826 asked PramodValavala-MSFT commented

Unable to trigger azure function though service bus queue

I wanted to trigger a function whenever a queue receives a message. The queue is getting loaded with the input message but service bus is not triggering the function. No error or No output.

azure-functionsazure-service-busazure-queue-storage
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am getting an error as "Unable to find the module named psycopg2"


But In my requirement.txt I have included this library

azure-functions==1.2.1
psycopg2-binary==2.8.5
sendgrid==6.3.1

during my deployment, only azure-functions is getting installed psycopg2 or SendGrid is not getting installed

0 Votes 0 ·

Could you share details on how you are deploying your app? Also, have you checked out the troubleshooting doc on the same?


0 Votes 0 ·

1 Answer

seanfeldman avatar image
0 Votes"
seanfeldman answered SanthoshS-5826 commented

That's an indication that your Function is not activated. And if it's not activated while a message is found on the queue, the potential issue would be Function configuration.
You need to specify connection string and queue name. If there is no connectivity exception, that tells me the connection string is working, Just validate is the right namespace connection. Then, check if the queue the Function is configured with is the right queue. And if everything checks out to be OK, then my friend, share the code. When you want a doctor to tell you what's wrong, you can't just claim you don't feel well. Either share it via GitHub or some other way to see what's happening. Don't forget to sanitize sensitive information to avoid world celebrations at your expense.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

When I checked out this the error I am getting is

"Exception while executing function: Functions.function <--- Result: Failure Exception: ModuleNotFoundError: No module named 'psycopg2'"


But I have included the above library in my requirement.txt file.

1) psycopg2
2) psycopg2-binary
3) azure-functions

when i check the deployment log only azure-functions is getting installed.

0 Votes 0 ·