You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2014/11/03 10:26:33 UTC
[jira] [Created] (QPID-6207) Broker retains hard references to
persistent messages of uncommitted transactions
Keith Wall created QPID-6207:
--------------------------------
Summary: Broker retains hard references to persistent messages of uncommitted transactions
Key: QPID-6207
URL: https://issues.apache.org/jira/browse/QPID-6207
Project: Qpid
Issue Type: Bug
Components: Java Broker
Affects Versions: 0.30, 0.31
Reporter: Keith Wall
If I run a simple JMS client transactionally publishing large persistent messages to a queue without committing the transaction, the Broker quickly fails with an OOM. This is regression wrt 0.28 which does not manifest the same issue.
I am testing with the 0-9 protocol.
{code:java}
try (InputStream resourceAsStream = this.getClass().getResourceAsStream("hello.properties"))
{
Properties properties = new Properties();
properties.load(resourceAsStream);
Context context = new InitialContext(properties);
ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
Connection connection = connectionFactory.createConnection();
connection.start();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Destination destination = (Destination) context.lookup("myqueue");
session.createConsumer(destination).close();
MessageProducer messageProducer = session.createProducer(destination);
int count=0;
while(true)
{
BytesMessage message = session.createBytesMessage();
message.writeBytes(new byte[1024 * 1024]);
messageProducer.send(message);
count++;
System.out.println("sent " + count);
// dont commit sessiomn
}
}
catch (Exception exp)
{
exp.printStackTrace();
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org