[
https://issues.apache.org/activemq/browse/AMQ-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52378#action_52378
]
Puneet Gupta commented on AMQ-2294:
-----------------------------------
I am using DUPS_OK_ACKNOWLEDGE acknowledgement mode and I explicitly call
acknowledge() only if the Acknowledge Mode is CLIENT_ACKNOWLEDGE.
This works ok if there is only 1 consumer on the queue. If I create multiple
consumers I start to see the hang with Acknowledge Mode AUTO_ACKNOWLEDGE and
DUPS_OK_ACKNOWLEDGE.
Here is the code:
public void onMessage ( Message aMessage )
{
try
{
if(aMessage != null)
{
System.out.println("received message" +
aMessage);
if (session.getTransacted())
{
try
{
session.commit();
}catch(JMSException jmse)
{
System.err.println("Error committing transaction....see trace for more
details");
jmse.printStackTrace();
}
}
}
else
{
if (session.getAcknowledgeMode() ==
Session.CLIENT_ACKNOWLEDGE)
aMessage.acknowledge();
}
}catch (Exception e)
{
e.printStackTrace();
}
}
> MessageProducer hangs when using many concurrent sessions
> ---------------------------------------------------------
>
> Key: AMQ-2294
> URL: https://issues.apache.org/activemq/browse/AMQ-2294
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.2.0
> Environment: I am using the default activemq.xml config. tested and
> reproduced on both windows and linux machines
> Reporter: Puneet Gupta
> Attachments: Consumer_ThreadDump.txt, Producer_ThreadDump.txt,
> ServerDebugLog_ThreadDump.txt
>
>
> If you create a client (producer) that creates 25 non-transacted sessions and
> concurrently starts sending messages. The producer will hang after sending
> exactly 2560 1K messages.
> This behavior is very easily reproducible.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.