Can create dangling transactions on unroutable messages.
--------------------------------------------------------

                 Key: QPID-440
                 URL: https://issues.apache.org/jira/browse/QPID-440
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: M2
         Environment: Java broker.
            Reporter: Rupert Smith


Sending a transactional message which is unroutable will create a dangling 
transaction that is never committed or rolled back.

Send messages to an unbound destination (or to the routing key with the same 
name as a queue that you forgot to bind, this was discovered by using a queue 
that was accidentally not bound). The broker will begin transaction, and save 
the message headers to the message store, before realizing that the message 
cannot be routed. So long as the message is not marked mandatory this will not 
cause an exception. The broker will not enqueue the message, so not realize 
that it has an open transaction. It fails to commit or rollback the 
transaction. Later, when the broker is shutdown the following exception may be 
seen:

2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:184) - Closing message metadata database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:189) - Closing message content database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:194) - Closing exchange database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:199) - Closing exchange database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:204) - Closing queue database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore 
(BDBMessageStore.java:209) - Close delivery database
2007-03-29 10:45:35,852 ERROR [Thread-0] 
registry.ApplicationRegistry$ShutdownService (ApplicationRegistry.java:78) - 
Error shutting down me
ssage store: com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing 
transaction opened against the Environment.
Aborting open transactions ...

com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction 
opened against the Environment.
Aborting open transactions ...

        at com.sleepycat.je.Environment.close(Environment.java:331)
        at 
org.apache.qpid.server.store.berkeleydb.BDBMessageStore.close(BDBMessageStore.java:219)
        at 
org.apache.qpid.server.virtualhost.VirtualHost.close(VirtualHost.java:236)
        at 
org.apache.qpid.server.registry.ApplicationRegistry.close(ApplicationRegistry.java:169)
        at 
org.apache.qpid.server.registry.ApplicationRegistry$ShutdownService.run(ApplicationRegistry.java:72)
        at java.lang.Thread.run(Thread.java:595)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to