I guess the subject of the day is expiration.. what a coincidence! :-)
This is a discussion about
http://jira.jboss.org/jira/browse/JBMESSAGING-951
On my local copy, I have added a tracing at ServerSessionEndpoint that I don't want to
commit but it was useful understanding this issue:
| void expireDelivery(Delivery del, Queue expiryQueue) throws Throwable
| {
| ...
| log.info("ExpireDelivery " + del + " queue = " +
expiryQueue, new Exception());
| ...
| }
|
Analyzing the logs, when running ExpiredMessageTest::testExpirationTransfer, I have a
sequence of messages...
This is the first one:
| java.lang.Exception
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:720)
| at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:207)
| at
org.jboss.messaging.core.local.RoundRobinPointToPointRouter.handle(RoundRobinPointToPointRouter.java:120)
| at org.jboss.messaging.core.ChannelSupport.deliverInternal(ChannelSupport.java:612)
| at org.jboss.messaging.core.ChannelSupport.handleInternal(ChannelSupport.java:759)
| at org.jboss.messaging.core.ChannelSupport.handle(ChannelSupport.java:157)
| at
org.jboss.messaging.core.local.PagingFilteredQueue.handle(PagingFilteredQueue.java:114)
| at
org.jboss.messaging.core.plugin.postoffice.DefaultPostOffice.route(DefaultPostOffice.java:333)
| at
org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:685)
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:298)
| at
org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:80)
| at
org.jboss.jms.server.endpoint.advised.SessionAdvised$send_6145266547759487588.invokeNext(SessionAdvised$send_6145266547759487588.java)
| at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:152)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
|
And after that... it keeps in a infinite loop between these methods...
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:720)
| at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:207)
| at
org.jboss.messaging.core.local.RoundRobinPointToPointRouter.handle(RoundRobinPointToPointRouter.java:120)
| at org.jboss.messaging.core.ChannelSupport.deliverInternal(ChannelSupport.java:612)
| at
org.jboss.messaging.core.ChannelSupport$InMemoryCallback.afterCommit(ChannelSupport.java:1035)
| at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:228)
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.moveInTransaction(ServerSessionEndpoint.java:1069)
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:729)
| at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:207)
| at
org.jboss.messaging.core.local.RoundRobinPointToPointRouter.handle(RoundRobinPointToPointRouter.java:120)
| at org.jboss.messaging.core.ChannelSupport.deliverInternal(ChannelSupport.java:612)
| at
org.jboss.messaging.core.ChannelSupport$InMemoryCallback.afterCommit(ChannelSupport.java:1035)
| at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:228)
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.moveInTransaction(ServerSessionEndpoint.java:1069)
| at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:729)
| at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:207)
| at
org.jboss.messaging.core.local.RoundRobinPointToPointRouter.handle(RoundRobinPointToPointRouter.java:120)
| at org.jboss.messaging.core.ChannelSupport.deliverInternal(ChannelSupport.java:612)
| at
org.jboss.messaging.core.ChannelSupport$InMemoryCallback.afterCommit(ChannelSupport.java:1035)
| at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:228)
|
So... after the message is expired.. .it is transfered to the ExpiryQueue.. and as it is
expired it is transfered from the ExpiryQueue again to the ExpiryQueue and keeps in loop
on that...
The fix is an easy fix probably. I will do it tomorrow first thing in the morning...
(Unless Tim or Serge want to fix it before me as they are few hours ahead in Europe :-) )
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042696#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...