If we want to have a notification system that could handle messages with different payloads and different versions, we have two options:<br><br>1) detect the version of the payload in the notification message<br>2) add a version number in the notification message<br>

<br>Option 1 sounds to me like something hard to maintain. Option 2 seems to be correct way to do it in the long term.<br><br>+1 for a version number in the notification message<br><br>Cheers<br>Diego<br clear="all"> -- <br>

<span style="border-collapse:separate;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif"><div style="font-size:13px" align="left"><div><font><span style="font-family:Arial" lang="ES">Diego Parrilla<br>

<a href="http://www.stackops.com/" title="file:///C:/Documents%20and%20Settings/carolina.capsir.per1/Application%20Data/Microsoft/Signatures/www.garrigues.com
www.garrigues.com" style="color:rgb(7,77,143)" target="_blank"><span title="file:///C:/Documents%20and%20Settings/carolina.capsir.per1/Application%20Data/Microsoft/Signatures/www.garrigues.com"></span></a></span></font><font style="font-family:arial,helvetica,sans-serif" face="Arial"><b>CEO</b><font size="1"><br>

</font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span></span><b><font style="font-family:arial,helvetica,sans-serif" face="Arial"><a href="http://www.stackops.com/" target="_blank"><b>www.stackops.com</b></a> | </font></b><font style="font-family:arial,helvetica,sans-serif" face="Arial"><font size="1"> <a href="mailto:diego.parrilla@stackops.com" target="_blank">diego.parrilla@stackops.com</a></font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span style="font-size:10pt" lang="EN-GB"></span></b></b></font></span></span><font style="font-family:arial,helvetica,sans-serif" face="Arial"><font size="1"> | </font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font style="font-family:arial,helvetica,sans-serif" face="Arial"><font size="1">+34 649 94 43 29 | <a>skype:diegoparrilla</a></font></font></span></span><font style="font-family:arial,helvetica,sans-serif" face="Arial"><a href="http://www.stackops.com/" target="_blank"><b><br>

</b></a></font></div></div><div style="font-size:13px"><font color="#004438" face="Arial"><b><p><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span style="font-size:10pt" lang="EN-GB"><img src="http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png"></span></b></b></font></span></span></span></span></p>

</b></font></div></span></span><div><br></div><br>
<br><br><div class="gmail_quote">On Wed, Oct 10, 2012 at 9:27 AM, Day, Phil <span dir="ltr"><<a href="mailto:philip.day@hp.com" target="_blank">philip.day@hp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi All,<br>
<br>
I guess I may have mis-stated the problem a tad in talking about version numbering.  The notification system is an outbound interface, and my interest is in being able to write consumers with some guarantee that they won't be broken as the notification message format evolves.<br>


<br>
Having a version number gives the client a way to know that it may now be broken, but that's not really the same as having an interface with some degree of guaranteed compatibility,<br>
<br>
Phil<br>
<div class="im"><br>
-----Original Message-----<br>
From: openstack-bounces+philip.day=<a href="mailto:hp.com@lists.launchpad.net">hp.com@lists.launchpad.net</a> [mailto:<a href="mailto:openstack-bounces%2Bphilip.day">openstack-bounces+philip.day</a>=<a href="mailto:hp.com@lists.launchpad.net">hp.com@lists.launchpad.net</a>] On Behalf Of David Ripton<br>


Sent: 09 October 2012 20:59<br>
To: <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Subject: Re: [Openstack] Versioning for notification messages<br>
<br>
</div><div class="im">On 10/09/2012 01:07 PM, Day, Phil wrote:<br>
<br>
> What do people think about adding a version number to the notification<br>
> systems, so that consumers of notification messages are protected to<br>
> some extent from changes in the message contents ?<br>
><br>
> For example, would it be enough to add a version number to the<br>
</div>> messages - or should we have the version number as part of the topic<br>
<div class="HOEnZb"><div class="h5">> itself (so that the notification system can provide both a 1.0 and 1.1 feed), etc ?<br>
<br>
Putting a version number in the messages is easy, and should work fine.<br>
  Of course it only really helps if someone writes clients that can deal with multiple versions, or at least give helpful error messages when they get an unexpected version.<br>
<br>
I think using separate topics for each version would be inefficient and error-prone.<br>
<br>
Inefficient because you'd have to send out multiples of each message, some of which would probably never be read.  Obviously, if you're sending out N copies of each message then you expect only 1/N the queue performance.  Worse, if you're sending out N copies of each message but only 1 of them is being consumed, your queue server is using a lot more memory than it needs to, to hold onto old messages that nobody needs.<br>


(If you properly configure a high-water mark or timeout, then the old messages will eventually be thrown away.  If you don't, then your queue server will eventually consume way too much memory and start swapping, your cloud will break, and someone will get paged at 2 a.m.)<br>


<br>
Error-prone because someone would end up reusing the notification queue code for less idempotent/safe uses of queues, like internal API calls.<br>
And then client A would pick up the message from topic_v1, and client B would pick up the same message from topic_v2, and they'd both perform the same API operation, resulting in wasted resources in the best case and data corruption in the worst case.<br>


<br>
--<br>
David Ripton   Red Hat   <a href="mailto:dripton@redhat.com">dripton@redhat.com</a><br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</div></div></blockquote></div><br>