title: NServiceBus PubSub - how to break binary dependencies between pub'r and sub'r?
body: <p>I have a requirement to build a NSB subscriber which will subscribe to messages being published by a service which is already live. This service was built with a messages assembly containing the NSB IMessage implementations which I want to subscribe to. So to build my subscriber I need a hard dependency on this assembly. </p>
  
  <p>When my subscriber starts up it sends some messages to the publisher input queue which results in the publisher recording my subscriptions in the database. One of my subscriptions looks like this:</p>
  
  <pre><code>MyNamespace.MyMessageType, MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=MyPublicKeyToken
  </code></pre>
  
  <p>Unfortunately the publisher is publishing messages from an assembly which is not strong named. So when publishing, the subscription evaluation process fails to evaluate successfully against my subscription, because the public key token of the message being published (value = null) does not match my subscription. </p>
  
  <p>My question is: Can I not subscribe to messages by Type and version only? Even better - can I not subscribe to messages based on some external contract (like an XSD) and break this dependency altogether?</p>
  
  <p>Many thanks in advance.</p>
  
  <p>UPDATE: The NSB docs hint at something like this here:</p>
  
  <p><a href="http://www.nservicebus.com/MessagesAsInterfaces.aspx" rel="nofollow">http://www.nservicebus.com/MessagesAsInterfaces.aspx</a></p>