Hello Neel Rajesh •,
The error message indicates that the function is failing to process the queue message and is hitting the MaxDequeueCount, causing it to be moved to the poison queue.
- Message Format Issues: Please verify that the message being sent is properly formatted as UTF-8 encoded JSON. Additionally, confirm that the connection string is correct and the payload is free of errors.
- Unhandled Exceptions: If json.loads() fails or if parsed_json is accessed before being defined, errors may occur without clear notification. Please ensure that all JSON parsing is performed safely to prevent such issues.
- False Success Logging: The function currently logs "completed successfully" even if an error occurs. Please make sure this message is only logged after the process completes without errors.
- Debug Tip: Test with a simple message like
{"test": "hello"}to isolate the problem. - Enhanced Logging: Modify the host.json file to enable debug-level logging for improved traceability.