Currently, JBoss AS creates a single MDB pool for an MDB instance, the number of MDB/threads configured by elements in standardjboss.xml .
At the company I work at, we would like to create per-customer MDBs. The reason is that for a particular customer, we may need to access remote resources of this customer that can be down, which tends to block processing of other customers' messages. Since we have a lot of customers, which are dynamically added/removed, it makes management difficult of these MDB pools.
In pseudo-code, it would work like the following:
1. Message on the server is read by JBoss
2. If a certain header (say "JBOSS_MESSAGE_POOL_ID") is set, JBoss looks for an existing pool. If one is not found, a new one is constructed. A worker thread is checked out and the MDB onMessage is called for this pool.
3. If the header is not found, the default pool is used.