在Mule ESB应用程序启动时恢复持久性vm队列

时间:2012-05-31 13:43:43

标签: mule

我正在尝试使用持久队列的vm传输;这是连接器配置:

<vm:connector 
        name="vmConnector"
        createMultipleTransactedReceivers="true"
        numberOfConcurrentTransactedReceivers="20">
    <vm:queue-profile maxOutstandingMessages="50000">
        <file-queue-store/>
    </vm:queue-profile>
</vm:connector>

传输工作正常并且传输.msg文件正在.mule的相应子目录中累积。现在,如果我杀死VM(或者定期关闭mule实例),然后重新启动mule和我的应用程序,我会期望消耗当前队列中的消息,但事实并非如此。

我明白了吗?我认为这种行为将是使用持久队列的一个原因。或者我的配置有问题?这是我可以从文档中收集到的所有内容,但我可能错过了一些内容。

编辑:在进一步检查时,我在申请日志中发现了以下投诉:

WARN  TransactionalQueueManager [THREAD vmConnector.scheduler.03 THREAD]: Could not commit tx 768d9b5c-ab3a-11e1-a48f-ff62aff02664[committing], rolling back instead
org.mule.util.xa.ResourceManagerException: Deleting ...\mule-enterprise-standalone-3.2.2\.mule\myapp\queuestore\work\0-768b784b-ab3a-11e1-a48f-ff62aff02664.msg failed (org.mule.api.store.ObjectStoreException)
    at org.mule.util.queue.QueueTransactionContext.doCommit(QueueTransactionContext.java:201)
    at org.mule.util.queue.TransactionalQueueManager.doCommit(TransactionalQueueManager.java:173)
    at org.mule.util.xa.AbstractResourceManager.commitTransaction(AbstractResourceManager.java:288)
    at org.mule.util.xa.DefaultXASession.commit(DefaultXASession.java:83)
    at org.mule.transport.vm.VMTransaction.doCommit(VMTransaction.java:59)
    at org.mule.transaction.AbstractTransaction.commit(AbstractTransaction.java:82)
    at org.mule.transaction.AbstractSingleResourceTransaction.commit(AbstractSingleResourceTransaction.java:78)
    at org.mule.transaction.TransactionTemplate.resolveTransaction(TransactionTemplate.java:147)
    at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:117)
    at org.mule.transport.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:138)
    at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:219)
    at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:85)
    at org.mule.transport.ContinuousPollingReceiverWorker.poll(ContinuousPollingReceiverWorker.java:36)
    at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:53)
    at org.mule.work.WorkerContext.run(WorkerContext.java:310)
    at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
    at org.mule.work.ScheduleWorkExecutor.doExecute(ScheduleWorkExecutor.java:41)
    at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:250)
    at org.mule.work.MuleWorkManager.scheduleWork(MuleWorkManager.java:208)
    at org.mule.transport.PollingReceiverWorkerSchedule.run(PollingReceiverWorkerSchedule.java:35)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.mule.api.store.ObjectStoreException: Deleting ...\mule-enterprise-standalone-3.2.2\.mule\myapp\queuestore\work\0-768b784b-ab3a-11e1-a48f-ff62aff02664.msg failed
    at org.mule.util.store.QueuePersistenceObjectStore.deleteStoreFile(QueuePersistenceObjectStore.java:310)
    at org.mule.util.store.QueuePersistenceObjectStore.doRemove(QueuePersistenceObjectStore.java:295)
    at org.mule.util.store.AbstractObjectStore.remove(AbstractObjectStore.java:91)
    at org.mule.util.queue.TransactionalQueueManager.doRemove(TransactionalQueueManager.java:191)
    at org.mule.util.queue.QueueTransactionContext.doCommit(QueueTransactionContext.java:193)
    ... 30 more

上述文件的确存在。

1 个答案:

答案 0 :(得分:1)

这是a known bug,已针对3.2.3 EE和3.3.0 CE修复。