-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limitBehavior option REMOVE_OLDEST/REMOVE_LOWPRIORITY does not remove when reached limit #345
Comments
@glassfishrobot Commented |
@glassfishrobot Commented
Sep 10, 2013 5:27:45 PM org.hibernate.validator.internal.util.Version
Listing all the destinations on the broker specified by: Host Primary Portlocalhost 7676 Name Type State Producers Consumers Msgs
|
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
It seems that the behavior of this option is different between REJECT_NEWEST and REMOVE_OLDEST/REMOVE_LOWPRIORITY.
• Isssue
The behavior of limitBehavior is different between REJECT_NEWEST and REMOVE_OLDEST/REMOVE_LOWPRIORITY.
• Steps to reproduce issue
Compile sample program. Set CLASSPATH for glassfish\lib\gf-client.jar and compile the attached program.
Set Connection Factory and Destination in Glassfish.
Create physical destination for message broker as follows:
imqcmd create dst -t q -n JMSQueue -u admin -pw admin
imqcmd update dst -t q -n JMSQueue -o maxTotalMsgBytes=5k -u admin -pw admin -f
Setting maxTotalMsgBytes=5k sets limit on the storage in Physical destination.
After the above steps are executed, set limitBehavior option as follows:
oSetting REMOVE_OLDEST/REMOVE_LOW_PRIORITY
1.imqcmd update dst -t q -n JMSQueue -o limitBehavior=REMOVE_OLDEST -u admin -pw admin -f
or
imqcmd update dst -t q -n JMSQueue -o limitBehavior=REMOVE_LOW_PRIORITY -u admin -pw admin -f
2.Send 1KB data x 5 times.
3.Verify the above. imqcmd list dst
4.5 messages are stored.
oSetting REJECT_NEWEST
1.imqcmd update dst -t q -n JMSQueue -o limitBehavior=REJECT_NEWEST -u admin -pw admin -f
2.Send 1KB data x 5 times. *Error occurs at 5th send.
3.Verify the above. Imqcmd list dst
4.4 messages are stored.
Based on the above results,
For REJECT_NEWEST, new data is rejected if existing data size + new data size is larger than maxTotalMsgBytes.
On the other hand, for REMOVE_OLDEST/REMOVE_LOW_PRIORITY, data is stored if existing data size is smaller than maxTotalMsgBytes.
It is possible that 1KB message is sent x 4 times and 10MB is sent at 5th time when 5KB is limit. I have attached the sample program to reproduce the problem and the log file.
Environment
Glassfish 4.0, OpenMQ 5.0
Affected Versions
[4.1, 4.2, 4.3, 4.4, 4.4u1, 4.4u2, 4.5, 4.5.1, 4.5.2, 5.0-RI (JMS2.0), 5.0]
The text was updated successfully, but these errors were encountered: