On 2/7/20 7:16 AM, akabhishek1 wrote:
Hi Team,

We were doing testing of Qpid JMS client for failed scenario. We are
receiving message as client acknowledgment mode.

Scenario - Receive message but do not acknowledge the message.

Issue - Memory is not getting released by Qpid on failed Scenario

In client acknowledge mode it is your responsibility to acknowledge messages when they have been processed.  The mechanics of the JMS consumer and session in client ack mode require that messages be retained such that a call to session recover can replay the delivered but unacknowledged messages so we cannot just release them on delivery.

Your sample is just receiving forever without any error conditions being simulated or handled so the client will accumulate messages.  This is really just a misuse of the client, you can resolve it in the test by periodically calling acknowledge on an incoming message and all previous messages will be acknowledged and releases and you'd see heap usage decrease as a result.

You mention that you are trying to test failed scenarios but the code given doesn't seem to be expressing any sort of handling of same so you might want to evaluate what you are trying to accomplish a bit more and maybe ask for help here on that end.



We could have this scenario in prodcution. We received the message, but
failed to process that message, so there will no aknowledgment. As we are
acknowledging only one success scenario.

Please find attached sample TestQpidRcvOnly.java, Total_Memory.PNG,
Sampler_Per_Thread_Allocation.PNG, Out_Of_Memory_Error.log .

Steps to reproduce this issue -->

1. Provide Correct details of QUEUE_NAME, SBUS_NAME, USERNAME, USERNAME in
TestQpidRcvOnly class
2. Publish 200000 message on QUEUE_NAME, from any utility
3. Start the TestQpidRcvOnly class and keep it running
4. Open JVisualVM and have a look on Heap memory
5. Wait for 20m, you can see memory consumption continously increasing
6. You can see Out Of Memory Error on exhaustion of defined Max heap Memory.
Could be 1hr depends on Max Size
7. You can have a look on Sampler--> Memory -->Per Thread Allocation, you
can observe that Qpid thread is consuming more that 98% memory.

Consumption is OK but it is not releasing the memory, which is the cause for
Out of Memory Error.

Using -- Java 8, Azure ServiceBus, Qpid-jms-client-0.48


Could you please take a look on this issue.

Regards,
Abhishek Kumar

Out_Of_Memory_Error.log
<http://qpid.2158936.n2.nabble.com/file/t396358/Out_Of_Memory_Error.log>
Sampler_Per_Thread_Allocation.PNG
<http://qpid.2158936.n2.nabble.com/file/t396358/Sampler_Per_Thread_Allocation.PNG>
TestQpidRcvOnly.txt
<http://qpid.2158936.n2.nabble.com/file/t396358/TestQpidRcvOnly.txt>
Total_Memory.PNG
<http://qpid.2158936.n2.nabble.com/file/t396358/Total_Memory.PNG>



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Tim Bish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to