You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "vincent boilay (JIRA)" <ji...@apache.org> on 2006/05/23 16:53:51 UTC
[jira] Created: (AMQ-721) Openwire client hangs after receiving 999
messages
Openwire client hangs after receiving 999 messages
--------------------------------------------------
Key: AMQ-721
URL: https://issues.apache.org/activemq/browse/AMQ-721
Project: ActiveMQ
Type: Bug
Components: JMS client
Versions: 4.0
Environment: .NET 2.0 ,C# + trunk
Reporter: vincent boilay
Priority: Blocker
Openwire client hangs after receiving 999 messages
changing Session.Prefetch postpone the problem...
Current code is :
public class Session : ISession
{
:
:
private int prefetchSize = 1000;
this block at message #999
changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-721) Openwire client hangs after receiving
999 messages
Posted by "Robert Winslow (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-721?page=comments#action_36458 ]
Robert Winslow commented on AMQ-721:
------------------------------------
I also have been dealing with this issue.
While I dont know if this is the correct solution (Dont know the code well enough yet) however, it did fix the issue for me.
Th eonly change I made was to MessageConsumer::DispatchAsyncMessages I added a call to AutoAcknowledge. This allowed me to get past the 1000 message Limit
[code]
public void DispatchAsyncMessages()
{
while (Listener != null)
{
IMessage message = dispatcher.DequeueNoWait();
if (message != null)
{
Listener(message);
**AutoAcknowledge(message);**
}
else
{
break;
}
}
}
[/code]
> Openwire client hangs after receiving 999 messages
> --------------------------------------------------
>
> Key: AMQ-721
> URL: https://issues.apache.org/activemq/browse/AMQ-721
> Project: ActiveMQ
> Type: Bug
> Components: JMS client
> Versions: 4.0
> Environment: .NET 2.0 ,C# + trunk
> Reporter: vincent boilay
> Priority: Blocker
>
>
> Openwire client hangs after receiving 999 messages
> changing Session.Prefetch postpone the problem...
> Current code is :
> public class Session : ISession
> {
> :
> :
> private int prefetchSize = 1000;
> this block at message #999
> changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-721) Openwire client hangs after receiving
999 messages
Posted by "James Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-721?page=comments#action_36431 ]
James Stanton commented on AMQ-721:
-----------------------------------
Oh, sorry, one more thing. Make sure you're connecting with tcp://localhost:61616?jms.optimizeAcknowledge=false (the jms.optimizeAcknowledge=false being the important part of that, at least until 4.0.1 is out which defaults to this)
> Openwire client hangs after receiving 999 messages
> --------------------------------------------------
>
> Key: AMQ-721
> URL: https://issues.apache.org/activemq/browse/AMQ-721
> Project: ActiveMQ
> Type: Bug
> Components: JMS client
> Versions: 4.0
> Environment: .NET 2.0 ,C# + trunk
> Reporter: vincent boilay
> Priority: Blocker
>
>
> Openwire client hangs after receiving 999 messages
> changing Session.Prefetch postpone the problem...
> Current code is :
> public class Session : ISession
> {
> :
> :
> private int prefetchSize = 1000;
> this block at message #999
> changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-721) Openwire client hangs after receiving
999 messages
Posted by "Robert Winslow (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-721?page=comments#action_36474 ]
Robert Winslow commented on AMQ-721:
------------------------------------
This issue has been outstanding for some time. While I could use another Language to allow me to use ActiveMQ it is not the prefered language. As such I will not be able to use an ActiveMQ as a solution.
Some input or some type of acknowledgment that this issue is being addressed would be fantastic,
> Openwire client hangs after receiving 999 messages
> --------------------------------------------------
>
> Key: AMQ-721
> URL: https://issues.apache.org/activemq/browse/AMQ-721
> Project: ActiveMQ
> Type: Bug
> Components: JMS client
> Versions: 4.0
> Environment: .NET 2.0 ,C# + trunk
> Reporter: vincent boilay
> Priority: Blocker
>
>
> Openwire client hangs after receiving 999 messages
> changing Session.Prefetch postpone the problem...
> Current code is :
> public class Session : ISession
> {
> :
> :
> private int prefetchSize = 1000;
> this block at message #999
> changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-721) Openwire client hangs after receiving
999 messages
Posted by "James Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-721?page=comments#action_36430 ]
James Stanton commented on AMQ-721:
-----------------------------------
I also had the same problem, but I was able to put together a hack that gets around this problem. I don't recommend this as the solution going forward, but it appears to work on my test cases (which failed before I implemented it).
First we need to change the dotNet dll client classes.
in class IMessageConsumer, add a new function:
IMessage AutoAcknowledge(IMessage message);
in class MessageConsumer, make AutoAcknowledge public rather then protected.
Then, create your dll.
Now, in your test app do the following:
Let's assume you've created a consumer called "consumer" and have defined the following:
consumer.Listener += new MessageListener(onMessage);
set up the listener function as follows:
public void onMessage(IMessage message)
{
If (consumer != null) //just a good idea to check
consumer.AutoAcknowledge(message);
// whatever you want to do with your message goes here... I've just put a Console.WriteLine here, but do whatever you want here
Console.WriteLine("got Message: " + ((ActiveMQTextMessage)message).Text);
}
This isn't an ideal solution, because it requires the MessageListener to call AutoAcknowledge, but it seems to work. I hope this helps folks who are trying to do this!
Jamie
> Openwire client hangs after receiving 999 messages
> --------------------------------------------------
>
> Key: AMQ-721
> URL: https://issues.apache.org/activemq/browse/AMQ-721
> Project: ActiveMQ
> Type: Bug
> Components: JMS client
> Versions: 4.0
> Environment: .NET 2.0 ,C# + trunk
> Reporter: vincent boilay
> Priority: Blocker
>
>
> Openwire client hangs after receiving 999 messages
> changing Session.Prefetch postpone the problem...
> Current code is :
> public class Session : ISession
> {
> :
> :
> private int prefetchSize = 1000;
> this block at message #999
> changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-721) Openwire client hangs after receiving
999 messages
Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-721?page=comments#action_36307 ]
Hiram Chirino commented on AMQ-721:
-----------------------------------
Hi Vincent,
Could you submit a simple nunit test case showing this problem?
> Openwire client hangs after receiving 999 messages
> --------------------------------------------------
>
> Key: AMQ-721
> URL: https://issues.apache.org/activemq/browse/AMQ-721
> Project: ActiveMQ
> Type: Bug
> Components: JMS client
> Versions: 4.0
> Environment: .NET 2.0 ,C# + trunk
> Reporter: vincent boilay
> Priority: Blocker
>
>
> Openwire client hangs after receiving 999 messages
> changing Session.Prefetch postpone the problem...
> Current code is :
> public class Session : ISession
> {
> :
> :
> private int prefetchSize = 1000;
> this block at message #999
> changing private int prefetchSize = 2000 ==> blocks at message #1999
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira