title: Using Service Bus to send messages from a Web Role to all other Web Roles
body: <p>I’m designing a backend that allows users to establish a TCP socket with it and send/receive stuff along this socket (using a pseudo-protocol I’ve made up) in real-time.</p>
  
  <p>It has to be scalable – i.e. architected on a cloud host. Currently I’m evaluating Windows Azure.</p>
  
  <p><br />
  To achieve scalability the application will run on several Web Role Instances. Meaning the users’ TCP sockets will be split across several instances (via a load balancer).</p>
  
  <p>This backend is an event-driven application – when a user sends something to it the message should be passed on to all other connected users.</p>
  
  <p>This means there must be a reliable way to send messages from one Web Role Instance to all other Web Role Instances. As far as I understand, this is what inter-role communication refers to.</p>
  
  <p><b>Using Service Bus, is it possible for all Web Role Instances to subscribe to a Topic and publish messages to it? Thus implementing the event-driven requirements of my distributed application?</b></p>
  
  <p>(If not then I’ve misunderstood what this article is about: <a href="http://windowsazurecat.com/2011/08/how-to-simplify-scale-inter-role-communication-using-windows-azure-service-bus/" rel="nofollow">http://windowsazurecat.com/2011/08/how-to-simplify-scale-inter-role-communication-using-windows-azure-service-bus/</a>) </p>
  
  <p><br /><i>
  I wanted to find this out before delving too deep into learning C#, .NET and Windows Azure development.</p>
  
  <p>Thank you for your help.</i></p>