Best table / enum driven method calling system
<p>Consider I'm interfacing with an external system that will send a message (DB table, message queue, web service) in some format.  In the "message header" there is the "MessageType" that is a number from 1 to 20.  The MessageType defines what to do with the rest of the message.  There are things like new, modified, deleted, canceled...</p>

<p>My first inclination was to setup an enumeration and define all the types.  Then parse the number into an enum type.  With it as an enum I would setup the typical switch case system and call a particular method for each of the message types.</p>

<p>One big concern is maintenance.<br />
A switch / case system is bulky and teadious  but, it's really simple.<br />
Various table / configuration systems can be difficult for someone else to grok and add new messages or tweak existing messages.</p>

<p>For 12 or so MessageTypes the switch/case system seems quite reasonable.  What would be a reasonable cut-off point to switch to a table driven system?</p>

<p>What kinds of systems are considered best for handling these types of problems?</p>

<p>I'm setting a tag for both C# and Java here because it's definitly a common problem.  There are many other languages with the same issue.</p>
