<div class="gmail_quote"><div>Nice summary.</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
2. To instance your handlers with IoC (using Castle Project for<br>
example) depending on your routing keys. This is the choice I tested<br>
and works good.<br></blockquote><div>Not sure what you mean here. Like with a property of some kind? What configuration mechanism are you plugging in via IoC. How is it selected?</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
4. Not using routing keys: To send your entities encapsulated in a<br>
fixed container with at least 2 fields (messageBody, messageType).<br>
Every time you receive a message you need to deserialize the envelope<br>
and read the "messageType" field and deserialize the messageBody (it<br>
should be an array of bytes) which holds your business entity. This<br>
approach is not faster as others due to the need of deserialize twice.<br></blockquote><div> </div><div>you could always do both, and deserialising a messageType could be very fast. For example, a 4 byte short integer could be: a. unencoded, b. we know that it starts in byte array position zero, and c. the messageBody starts in position 4 and stops at length-1. Sounds fast. </div>
<div> </div><div>Likewise a fixed length string of 10 or 20 chars is going to be fast too if an int isn't meaningful enough.</div><div> </div><div>Maybe version the message in an AQMP header... or version it yourself (byte 0).</div>
<div> </div><div><div><div>This "packet" approach worked for TCP/IP... and I *think* TCP/IP did okay in the end. </div></div></div><div> </div><div>Once you decide, you've got to leave it baked in. Otherwise, you've only got (2^8) chances to change your mind assuming a 1 byte version number. </div>
<div> </div><div>The advantage of not using an AQMP header is just that my read on the spec was that they only guaranteed that the body field would be there in the future. Are these tags getting more cetain yet?</div><div>
</div><div>-Steven</div></div>