[ 
https://issues.apache.org/jira/browse/QPID-6207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14194442#comment-14194442
 ] 

Rob Godfrey commented on QPID-6207:
-----------------------------------

This is sort of by design, in as much as the store doesn't ensure the message 
is on disk until the transaction commits.

We can build in some sort of large transaction protection however if we record 
the messages that are currently in our transaction and call flowToDisk() on 
them if the uncommitted transaction size grows large.  

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to