Original post

Hey all,

Got a front end API that sends messages to back end services. Right now, the message bus uses just string values as the topic name to send something on, or subscribe to. Also, some services can pub/sub with other services as well, not just the API services. With that in mind, do you put version values within the topic name string?

As an example, say I have a simple Email service, version 1. It only handles a TO and a message body. Json like {to: ‘…@…com‘, msg: ‘blah blah’}. Now, I get a more robust email service I can use, that can now support CC, html body, subject, etc. I also decide msg is not a good key.. so I modify the JSON payload to something like {to:…, subject:…, body:… cc:…}. Clearly the first version of my email service wont decode the new format correctly. But if I change the current service to the new format, then services still sending the old format wont work either. So.. in the case of event bus with topic strings… is the way to go to spin up a 2nd (new email service) while the 1st one still runs.. so that services now ready to use the new 2nd version, can work (using a new topic string.. either with v2 in it, or some new name like NewEmailService) and the current services using the old email service continue to work?