Timothy Bish wrote:
>
> If you could provide a short but complete sample app that demonstrate
> the problem that would help to diagnose what the issue might be.
>
> Regards
> Tim.
>
Hi Tim,
yeah, that's a good idea. I've found out that this simple app can
reproduce the error:
__________________________________
using System;
using Apache.NMS.ActiveMQ;
using Apache.NMS;
using Apache.NMS.ActiveMQ.Commands;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
ConnectionFactory connectionFactory = new
ConnectionFactory("failover:(tcp://localhost:61616)");
IConnection connection = connectionFactory.CreateConnection();
ISession session = connection.CreateSession();
IMessageConsumer consumer = session.CreateConsumer(new
ActiveMQQueue("FrqQueueSentByJava"));
for (int i = 0; i < 10000; i++)
{
IMessage message = consumer.Receive();
if (message is ITextMessage)
{
Console.WriteLine("Content: " +
((ITextMessage)message).Text);
}
}
}
}
}
__________________________________
Prerequisites: there are several thousands of messages in the queue (already
generated, the generation doesn't run any more. Only this consumer is
running). The messages' content is this:
__________________________________
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567Hello,
C# world#11!
__________________________________
...that "11" at the end is a random number between 1 and 100. The messages
were generated by a Java app.
This is my activemq.xml:
__________________________________
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this
configuration file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="client3" persistent="false" useJmx="true">
<!-- Use the following to configure how ActiveMQ is exposed in JMX
-->
<managementContext>
<managementContext connectorPort="9999"/>
</managementContext>
<!-- The store and forward broker networks ActiveMQ will listen to
-->
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector name="nc" uri="multicast://default"
dynamicOnly="true" conduitSubscriptions="false"
decreaseNetworkConsumerPriority="true" />
</networkConnectors>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
</transportConnectors>
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue="FrqQueueSentByCSharp.>"
memoryLimit="512mb" producerFlowControl="false" useCache="false">
<dispatchPolicy>
<roundRobinDispatchPolicy />
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<timedSubscriptionRecoveryPolicy recoverDuration="10000"
/>
</subscriptionRecoveryPolicy>
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="10"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry queue="FrqQueueSentByJava.>"
memoryLimit="512mb" producerFlowControl="false" useCache="false">
<dispatchPolicy>
<roundRobinDispatchPolicy />
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<timedSubscriptionRecoveryPolicy recoverDuration="10000"
/>
</subscriptionRecoveryPolicy>
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="10"/>
</pendingMessageLimitStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
</broker>
<!-- An embedded servlet engine for serving up the Admin console -->
<jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
<connectors>
<nioConnector port="8162"/>
</connectors>
<handlers>
<webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
</handlers>
</jetty>
</beans>
__________________________________
If anyone can help me, you will save my life :) Thank you very, very much.
Peter
--
View this message in context:
http://www.nabble.com/C--client-stops-receiving-messages-after-getting-%7E400-of-them-tp25381671p25397622.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.