You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Pat Fox (Created) (JIRA)" <ji...@apache.org> on 2012/02/29 14:07:57 UTC
[jira] [Created] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
---------------------------------------------------------------------------------------------------------------------------------------
Key: AMQ-3746
URL: https://issues.apache.org/jira/browse/AMQ-3746
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.5.1
Reporter: Pat Fox
Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
I get the following thread dump
{code}
"main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f39f1b30> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
- locked <7f39f1b30> (a java.lang.Object)
at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
{code}
It seems the TopicSubscription does not support "pullMessage".
This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQ-3746.
-------------------------------
Resolution: Fixed
Fixed on trunk
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 5.8.0
>
> Attachments: AMQ-3746.txt, APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458648#comment-13458648 ]
Gary Tully commented on AMQ-3746:
---------------------------------
that reads very like the use case for a retroactive consumer. I would expect a poll to only work if there is something pending in the retroactive buffer. But a poll should not block for ever. That is really a bug.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 5.8.0
>
> Attachments: AMQ-3746.txt, APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated AMQ-3746:
-----------------------------
Priority: Minor (was: Major)
Fix Version/s: 5.8.0
Assignee: Timothy Bish
Tim, sounds like a good idea.
Maybe try to revisit your patch for the 5.8 release.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 5.8.0
>
> Attachments: AMQ-3746.txt, APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Pat Fox (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pat Fox updated AMQ-3746:
-------------------------
Attachment: APotentialFixForAMQ-3746.patch
Perhaps rather than reaching a hanging state, the MessageConsumer could "fail fast" at creation time if prefetch=0 for non durable topic subscribers.
To that effect, I have attached "APotentialFixForAMQ-3746.patch" where the ActiveMQMessageConsumer constructor does the following check.
{code}
// AMQ-3746
// if prefetch set to zero for Non Durable topic Consumer, throw a JMS Exception.
if(this.getPrefetchNumber() == 0 && info.getDestination().isTopic() && !isDurableSubscriber()){
throw new JMSException("Cannot have a prefetch size of zero for a Non Durable Topic Subscriber");
}
{code}
I hope the above check should isolate just Non Durable Topic consumers with prefetch=0, perhaps someone could review it? Maybe there is a cleverer way to resolve this issue?
patch created off lastest revision (1295087)
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Attachments: APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Pat Fox (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pat Fox updated AMQ-3746:
-------------------------
Attachment: TopicSubscriptionZeroPrefetchTest.patch
attached a new junit testcase to illustrate issue.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Attachments: TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Timothy Bish (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish updated AMQ-3746:
------------------------------
Attachment: AMQ-3746.txt
Another potential fix is to actually allow TopicSubscription to work with a zero prefetch. A pullMessage request could open a window to allow one topic message to get dispatched to the topic inside the pull time window given. This basically allows the consumer to always be a slow consumer, and messages are stored based on the maxPendingMessageLimit. Not sure what the use case for that would be but its possible. Here's a rough patch that adds this, not tested very heavily.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Attachments: AMQ-3746.txt, APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Pat Fox (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pat Fox updated AMQ-3746:
-------------------------
Description:
Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
I get the following thread dump
{code}
"main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f39f1b30> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
- locked <7f39f1b30> (a java.lang.Object)
at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
{code}
It seems the TopicSubscription does not support "pullMessage".
This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
was:
Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
I get the following thread dump
{code}
"main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7f39f1b30> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
- locked <7f39f1b30> (a java.lang.Object)
at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
{code}
It seems the TopicSubscription does not support "pullMessage".
This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do exhibit this behavior.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Attachments: TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3746) Non Durable Topic subscription with
prefetch=0, MessageConsumer.receivenowait() (or
MessageConsumer.receive(timeout) hangs indefinitely
Posted by "Pat Fox (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219507#comment-13219507 ]
Pat Fox commented on AMQ-3746:
------------------------------
After applying "APotentialFixForAMQ-3746.patch" I noticed a change in exception behavior around the "MessageListener" case. Before applying the patch ActiveMQMessageConsumer.setMessageListener()
throws the JMSException below when prefetch=0.
before patch:
{code}
javax.jms.JMSException: Illegal prefetch size of zero. This setting is not supported for asynchronous consumers please set a value of at least 1
at org.apache.activemq.ActiveMQMessageConsumer.setMessageListener(ActiveMQMessageConsumer.java:417)
...
{code}
after applying the patch the following exception is thrown when creating the ActiveMQMessageConsumer before ActiveMQMessageConsumer.setMessageListener() can be called.
{code}
javax.jms.JMSException: Cannot have a prefetch size of zero for a Non Durable Topic Subscriber
at org.apache.activemq.ActiveMQMessageConsumer.<init>(ActiveMQMessageConsumer.java:245)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1134)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1078)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:991)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:964)
...
{code}
Although it results in the same overall outcome, it does change the existing (correct) exception behavior.
Hence not sure if "Fail Fast" in "APotentialFixForAMQ-3746.patch" is the best approach.
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3746
> URL: https://issues.apache.org/jira/browse/AMQ-3746
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.5.1
> Reporter: Pat Fox
> Attachments: APotentialFixForAMQ-3746.patch, TopicSubscriptionZeroPrefetchTest.patch
>
>
> Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.
> I get the following thread dump
> {code}
> "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <7f39f1b30> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:485)
> at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
> - locked <7f39f1b30> (a java.lang.Object)
> at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
> at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
> at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
> {code}
> It seems the TopicSubscription does not support "pullMessage".
> This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do *NOT* exhibit this behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira