1
votes

All the examples I find about Service Bus Queues are in the scenario where the web role sends the message and there's a dedicated worker role receiving the messages.

Mi situation is different. The worker role is the one that generates the messages and must be received by the web role.

I guess that the RoleEntryPoint of the webrole should have an infinite while that listens for new messages, but the messages received must be processed by components in my webrole and as far as I know the RoleEntryPoint is not accesible from the web app.

Any Ideas?

1

1 Answers

0
votes

There's absolutely no difference whether you send or receive the message from a web role or worker role, as they're both Windows Server 2012 VM instances. You can spin up threads from the Run() method, or from wherever else you want. You could even write a separate console app to process service bus messages, or even receive them from an app running on your own desktop.

Just treat Service Bus as a service that's consumable from your apps, wherever they may be (and in whatever language you're working with).