Reuse Friendly Practices When Using Messaging Publications

December 3, 2009

Here are a few useful practices that will facilitate systematic reuse when using message publications:

  1. Organize publication topics by a domain relevant hierarchy – this will help cater to subscribers that are interested in fine grained messages as well as those who want an entire set of related publications.
  2. Version publications – if one publication can send multiple types of business/data entities, version them as well.
  3. Separate publication into a header and business payload section. This will help you write utilities that can examine the header and take action – e.g. display any publication as XML, report on a variety of metrics etc.
  4. Reuse xml schema contracts that are used in your web service API as much as possible in the business payload publications. This will reduce the programming and integration effort for your consumers. They can reuse the same code regardless of whether a message came as a reply or sent as a publication.
  5. Support multiple data formats – not all your consumers might want XML. Some might prefer delimited text or fixed length messages. Your services platform can publish the same message in multiple data formats across topics – e.g. com.yourcompany.messaging.customer_v1_0.XML and com.yourcompany.messaging.customer_v1_0.FIXED_LENGTH

These are some of the guidelines I have used. Have you used additional ones to facilitate reuse?

Like this post? Subscribe to RSS feed or get blog updates via email.

tweet this

%d bloggers like this: