title: pub/sub nservicebus beginner
body: <p>I am trying to get a simple NServiceBus pub/sub working.  Here is what I am trying to do.
  I am trying to read a message from msmq, and pub publishes the messages to sub, and the sub will insert the messages to sub's queue.  (right now, there are all on same computer). </p>
  
  <p>I have a pub and a sub (there are Written as console apps).  I also have a Message class, and here it is.</p>
  
  <pre><code>    [Serializable]
  public class Message : IEvent
  {
      public string name { get; set; }
  
  }
  
  public interface IEvent : IMessage
  {
      string name { get; set; }
  
  }
  </code></pre>
  
  <p>And, this is my pub</p>
  
  <pre><code>            IBus bus = NServiceBus.Configure.With()
              .DefaultBuilder()
              .XmlSerializer()
              .MsmqTransport()
                  .IsTransactional(true)
                 .PurgeOnStartup(false)
              .UnicastBus()
              .ImpersonateSender(false)
              .MsmqSubscriptionStorage()
              .CreateBus().
              Start(); 
  </code></pre>
  
  <p>sub looks same execpt that it has  .LoadMessageHandlers().</p>
  
  <p>I understand that you have to handle the message, where do you put the Handle() on sub side?  I want to read them and put them into sub's queue.</p>
  
  <p>Thanks.</p>