Hi Folks,
I've been doing a bit of work in the Headers and XML exchanges recently and I've noticed that there is a lot of common/duped code across the exchange implementations, including Direct, Fanout etc. I would like to carry out a minor refactor to push some of this code to the base Exchange class, and also change the code pattern in the bind() implementations across the board. Because almost all of the Exchange implementations are federated (I've got a patch for the XML Exchange, which is the last one not federated, and is almost debugged), I'd like to implement a code reduction across the classes. The *pattern* in the bind() method is a pattern in this case :) Whilst we need to adhere to the spec on args and sigs etc., anyone that knows this code knows that bind() in the federated case actually needs to be 3 separate variants; fed_bind(), fed_unbind(), fed_reOrigion(); These names are subject to change because I don't like them! I have ideas about how I would like to do this, but before I show my hand, I'd like to hear what people think/want. If people think the extra maintenance on these existing classes is fine, then please stick you hand up!
all the best,
Sam
P.S. The reason I'm not giving my direct thoughts is that I want to hear other peoples opinions before I make my proposal. Community wins!. But my basic idea is to add several "protected" methods to the base Exchange class, which are overrided by the separate exchange implementations, as necessary.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to