title: HelloWorld example for sending an object over RabbitMQ via EasyNetQ between two different applications
body: <p>Hi I am attempting to send a simple object like through RabbitMQ via EasyNetQ.  I'm having issues deserializing that object on the subscription side.  Anyone able to show me a sample of how this works.  Keep in mind the object being sent is defined in it's own project and not shared among the publisher and subscriber.  Here is my sample, and perhaps you can tell me what is wrong with it?</p>
  
  <p>Program A:</p>
  
  <pre><code>class ProgramA
  {
      static void Main(string[] args)
      {
          using (var bus = RabbitHutch.CreateBus("host=localhost"))
          {
              Console.WriteLine("Press any key to send the message");
              Console.ReadKey();
              bus.Publish(new MessageA { Text = "Hello World" });
              Console.WriteLine("Press any key to quit");
              Console.ReadKey();
          }
      }
  
      public class MessageA
      {
          public string Text { get; set; }
      }
  }
  </code></pre>
  
  <p>Program B:</p>
  
  <pre><code>class ProgramB
  {
      static void Main(string[] args)
      {
          using (var bus = RabbitHutch.CreateBus("host=localhost"))
          {
              bus.Subscribe&lt;MessageB&gt;("", HandleClusterNodes);
              Console.WriteLine("Press any key to quit");
              Console.ReadKey();
          }
      }
  
      private static void HandleClusterNodes(MessageB obj)
      {
          Console.WriteLine(obj.Text);
      }
  
      [Queue("TestMessagesQueue", ExchangeName = "EasyNetQSample.ProgramA+MessageA:EasyNetQSample")]
      public class MessageB
      {
          public string Text { get; set; }
      }
  }
  </code></pre>
  
  <p>Here is the error I'm receiving:</p>
  
  <pre><code>DEBUG: HandleBasicDeliver on consumer: f9ded52d-039c-411a-9b9f-5c8ee3301854, deliveryTag: 1
  DEBUG: Received
          RoutingKey: ''
          CorrelationId: 'ec41faea-a0c8-4ffd-8163-2cbf85d45fcd'
          ConsumerTag: 'f9ded52d-039c-411a-9b9f-5c8ee3301854'
          DeliveryTag: 1
          Redelivered: False
  ERROR: Exception thrown by subscription callback.
          Exchange:    'EasyNetQSample.ProgramA+MessageA:EasyNetQSample'
          Routing Key: ''
          Redelivered: 'False'
  Message:
  {"Text":"Hello World"}
  BasicProperties:
  ContentType=NULL, ContentEncoding=NULL, Headers=[], DeliveryMode=2, Priority=0, CorrelationId=ec41faea-a0c8-4ffd-8163-2cbf85d45fcd, ReplyTo=NULL, Expiration=NULL, MessageId=NULL, Timestamp=0, Type=EasyNetQSample.ProgramA+MessageA:EasyNetQSample, UserId=NULL, AppId=NULL, ClusterId=NULL
  Exception:
  System.AggregateException: One or more errors occurred. ---&gt; EasyNetQ.EasyNetQException: Cannot find type EasyNetQSample.ProgramA+MessageA:EasyNetQSample
     at EasyNetQ.TypeNameSerializer.DeSerialize(String typeName)
     at EasyNetQ.DefaultMessageSerializationStrategy.DeserializeMessage(MessageProperties properties, Byte[] body)
     at EasyNetQ.RabbitAdvancedBus.&lt;&gt;c__DisplayClass19.&lt;Consume&gt;b__18(Byte[] body, MessageProperties properties, MessageReceivedInfo messageReceivedInfo)
     at EasyNetQ.RabbitAdvancedBus.&lt;&gt;c__DisplayClass1e.&lt;Consume&gt;b__1d(Byte[] body, MessageProperties properties, MessageReceivedInfo receviedInfo)
     at EasyNetQ.Consumer.HandlerRunner.InvokeUserMessageHandler(ConsumerExecutionContext context)
     --- End of inner exception stack trace ---
  ---&gt; (Inner Exception #0) EasyNetQ.EasyNetQException: Cannot find type EasyNetQSample.ProgramA+MessageA:EasyNetQSample
     at EasyNetQ.TypeNameSerializer.DeSerialize(String typeName)
     at EasyNetQ.DefaultMessageSerializationStrategy.DeserializeMessage(MessageProperties properties, Byte[] body)
     at EasyNetQ.RabbitAdvancedBus.&lt;&gt;c__DisplayClass19.&lt;Consume&gt;b__18(Byte[] body, MessageProperties properties, MessageReceivedInfo messageReceivedInfo)
     at EasyNetQ.RabbitAdvancedBus.&lt;&gt;c__DisplayClass1e.&lt;Consume&gt;b__1d(Byte[] body, MessageProperties properties, MessageReceivedInfo receviedInfo)
     at EasyNetQ.Consumer.HandlerRunner.InvokeUserMessageHandler(ConsumerExecutionContext context)&lt;---
  </code></pre>
  
  <p>What do I need to do to be able to properly deserialize <code>MessageA</code>?</p>