User283571144 posted
Hi leee1984,
How webapi controller can get the message subscription so that api can process the message and insert to database. I don't want to use any azure functions. I want subscribe message in my webapi(micro
service directly).
According to your description, I suggest you could consider using the azure service bus library to achieve your requirement.
I suggest you could use the Microsoft.Azure.ServiceBus package, then you could try bellow codes to receive the message from serivcebus and insert them into database.
More details about the code sample, you could refer to below article:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-how-to-use-topics-subscriptions#5-receive-messages-from-the-subscription
Best Regards,
Brando