Aug 24th, 2008, 07:57 PM
Dynamic creation and cleanup
Rather than having a static setup defined in xml, we create channels/endpoints/adapters etc. on the fly. This is working nicely for consumption and production. We do however have a problem when it comes to cleanup (i.e. when a user wants to destroy a consumer/producer). We end up with consumers hanging around (because we haven't written any cleanup code). Stopping the JVM of a consumer does not remove the consumer (we are using ActiveMQ at the moment).
We need to be able todo the following:
1) Terminate a particular consumer when the user triggers this.
2) Terminate all consumers (or get access to all consumers so that we can individually terminate them)
For the first, do we just unregister the channel and (source) endpoint on the bus, or is there more we need to do?
For the second, is this even valid, or are we relying on the fact that we know we are the only consumer (i.e. we are operating point-to-point)?