Keith Wall created QPID-6851:
--------------------------------
Summary: AMQP 1.0 TemporaryQueues not deleted on connection close
Key: QPID-6851
URL: https://issues.apache.org/jira/browse/QPID-6851
Project: Qpid
Issue Type: Bug
Components: Java Broker
Affects Versions: qpid-java-6.0
Reporter: Keith Wall
If I create a JMS temporary queue through the Qpid JMS client, the temporary
queue is created successfully, but the temporary queue remains even after the
connection is closed.
It appears the Java Broker is not respecting DELETE_ON_CONNECTION_CLOSE on the
AMQP 1.0 path. The problem is the same even if a consumer has been created on
the queue.
{code:java}
public class TempQueue
{
private static final String USER = "guest";
private static final String PASSWORD = "guest";
public static void main(String[] args) throws Exception {
try {
// The configuration for the Qpid InitialContextFactory has been
supplied in
// a jndi.properties file in the classpath, which results in it
being picked
// up automatically by the InitialContext constructor.
Context context = new InitialContext();
ConnectionFactory factory = (ConnectionFactory)
context.lookup("myFactoryLookup");
Connection connection = factory.createConnection(USER, PASSWORD);
connection.start();
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
TemporaryQueue temporaryQueue = session.createTemporaryQueue();
session.createConsumer(temporaryQueue);
connection.close();
// temporary queue remains even after connection close
} catch (Exception exp) {
System.out.println("Caught exception, exiting.");
exp.printStackTrace(System.out);
System.exit(1);
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]