Hi Apurva Pathak ,
Thankyou for using Microsoft Q&A platform and thanks for posting your query here.
From the description of your query , it looks like you are facing issue where Event Hub namespaces are not resolving with the private IP of the resource, even though you have created private endpoints .
While creating the namespace, 'private access' could be configured .
Else, For the existing namespace, make sure to disable 'Public network access'
For more details , kindly check this official documentation : https://learn.microsoft.com/en-us/azure/event-hubs/private-link-service#configure-private-access-for-an-existing-namespace
Validate that the private link connection is successful with the help of nslookup command: https://learn.microsoft.com/en-us/azure/event-hubs/private-link-service#validate-that-the-private-link-connection-works
Hope it helps. Thankyou