tags:

views:

19

answers:

1

What is the best way for a publisher to expose a publication? I would think that it would be just 3 pieces of information:

  1. The schema of the messages
  2. The encoding of the messages
  3. The endpoint where new subscription endpoints can be registered

For #1, I can see this being shared in a number of ways: WSDL, XSD, .cs file, .dll

For #2, it would probably be binary, SOAP, JSON, etc.

For #3, I can see this being shared as a Publisher/PublisherInputQueue or maybe a connection string to a Subscription DB

My question is, with all of these options, which is the best choice? Especially for #1 and #2, I would like to know pros/cons of the different options. Thanks!

A: 

For #1, you can give subscribers the DLL or generate an XSD for it using the XsdGenerator.exe tool.

For #2, when doing pub/sub, you usually want loosely coupled interaction so using the XmlSerializer will probably be your best choice. When it comes to clients that are sending commands to a server, you may prefer the BinarySerializer.

As to #3, this is something that administrators usually manage.

Udi Dahan
If I use the XML Serializer, does it have "extraneous data tolerance" in cases where a publisher adds a field to a message but subscribers haven't upgraded yet?
skb
Yes, receivers of a message ignore data that they don't understand.
Udi Dahan