On 28 November 2011 20:49, Julio Polo <span dir="ltr"><<a href="mailto:julio@hawaii.edu">julio@hawaii.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Would it be unusual for a producer to publish two versions of every<br>
message, one in XML, another in JSON? If it's not unusual, is the<br>
typical implementation to set up a separate exchange for each format?<br></blockquote><div><br>That would work fine. Another possibility is that if you can mechanically compute the one from the other, you might<br><ul><li>
make your producers emit one (say, the JSON)</li><li>have a special consumer program listening to the exchange for JSON-formatted messages, which</li><ul><li>translates each message into XML, and</li><li>posts the translation back into the exchange (or a different one; or with a different routing key)<br>
</li></ul></ul><p>So long as you make sure to tag messages with their MIME type in the content-type header, the translator process won't get confused. The benefit is that your producers are simpler, and the logic for understanding the equivalences between the JSON and the XML is gathered all in one place.</p>
<p>Regards,<br> Tony<br></p></div></div>