You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2008/03/24 07:30:32 UTC

[jira] Created: (AMQ-1632) PrefetchSubscription may not wake up if messages delivered in transaction

PrefetchSubscription may not wake up if messages delivered in transaction
-------------------------------------------------------------------------

                 Key: AMQ-1632
                 URL: https://issues.apache.org/activemq/browse/AMQ-1632
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 4.1.1
            Reporter: David Jencks
            Assignee: David Jencks
             Fix For: 4.1.2


we noticed mdbs w/transaction on don't work if the prefetch size is less than the number of sessions for the mdb.  There's an error in calculating the prefetchExtension in afterCommit and there's no notification that it might be time to send more messages.  Apparently if the prefetch size is large enough one of the earlier acks triggers delivery of the next batch.

There are also a bunch of synchronization errors in some classes...

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


[jira] Commented: (AMQ-1632) PrefetchSubscription may not wake up if messages delivered in transaction

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41769#action_41769 ] 

David Jencks commented on AMQ-1632:
-----------------------------------

I talked with Hiram a bit and we decided that the real problem was that prefetchSize was being calculated wrong.  MDBs instances for an activation spec all share a single multithreaded consumer.  So the prefetch size ought to be maxMessagesPerSession * maxSessions, so each mdb gets a chance at maxMessagesPerSession.  Previously prefetchSize = maxMessagesPerSession which resulted in some mdbs never getting a chance to process anything if maxMessagesPerSession < maxSessions.

Still haven't looked at trunk.

> PrefetchSubscription may not wake up if messages delivered in transaction
> -------------------------------------------------------------------------
>
>                 Key: AMQ-1632
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1632
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> we noticed mdbs w/transaction on don't work if the prefetch size is less than the number of sessions for the mdb.  There's an error in calculating the prefetchExtension in afterCommit and there's no notification that it might be time to send more messages.  Apparently if the prefetch size is large enough one of the earlier acks triggers delivery of the next batch.
> There are also a bunch of synchronization errors in some classes...

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


[jira] Commented: (AMQ-1632) PrefetchSubscription may not wake up if messages delivered in transaction

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41760#action_41760 ] 

David Jencks commented on AMQ-1632:
-----------------------------------

Fixed in rev 640336, branches 4.1.  The actual fix is in   activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java, other files contain thread-safety improvements.  Leaving open till I can check trunk for similar problems.

> PrefetchSubscription may not wake up if messages delivered in transaction
> -------------------------------------------------------------------------
>
>                 Key: AMQ-1632
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1632
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> we noticed mdbs w/transaction on don't work if the prefetch size is less than the number of sessions for the mdb.  There's an error in calculating the prefetchExtension in afterCommit and there's no notification that it might be time to send more messages.  Apparently if the prefetch size is large enough one of the earlier acks triggers delivery of the next batch.
> There are also a bunch of synchronization errors in some classes...

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


[jira] Closed: (AMQ-1632) PrefetchSubscription may not wake up if messages delivered in transaction

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks closed AMQ-1632.
-----------------------------

    Resolution: Fixed

Still a good idea to look at trunk.

> PrefetchSubscription may not wake up if messages delivered in transaction
> -------------------------------------------------------------------------
>
>                 Key: AMQ-1632
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1632
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> we noticed mdbs w/transaction on don't work if the prefetch size is less than the number of sessions for the mdb.  There's an error in calculating the prefetchExtension in afterCommit and there's no notification that it might be time to send more messages.  Apparently if the prefetch size is large enough one of the earlier acks triggers delivery of the next batch.
> There are also a bunch of synchronization errors in some classes...

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