Project: mule
Issue MULE-7128: Need to support short lived queues
So far, all queues in Mule start and stop with the mule context, meaning that once a queue is created it remains active until the owning application stops. This model does not fit the Batch module, which creates queues when a job instance is started and then needs to discard it when the job instance finishes. The clear() method that was added in 3.5.0-ME allows reclaiming the storage but the QueueManager still keeps in-memory resources that are never freed. Therefore the QueueManager interface needs to add the following method: void disposeQueue(Queue); This method frees all resources currently held by the queue including the storage (meaning that queue.clear() will be invoked automatically) Additionally, another common need when dealing with short lived queues is the ability to easily create/retrieve queues with custom configurations. To do that, the QueueSession interface will gain the following method: Queue getQueue(String name, QueueConfiguration queueConfiguration);
Story points: 2