Hello @Mahammed Javed Akhtar,
welcome to this moderated Azure community forum.
It's hard to say what error you encounter without detailed information.
Check out this blog post regarding the MQTT topic support by the IoT Hub (code demonstrated is found on GitHub).
The message topic looks like:
$"devices/{_clientId}/messages/events/";
where the clientId is the deviceId.
This message can be extended with user properties (as seen in the example).
Please compare the full example (including making the connection) with your code.
It is recommended to use the Azure IoT Hub device SDK where possible. It simplifies the logic, adds error handling, and hides complexity.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.