[mq-users] Re: Question on limitBehavior option

  • From: Amy Kang <amy.kang@...>
  • To: "Okubo, Takuji" <takujio@...>
  • Cc: users@...
  • Subject: [mq-users] Re: Question on limitBehavior option
  • Date: Wed, 11 Sep 2013 20:01:47 -0700

Hi Takuji,

Thanks for reporting this.  Could you please file  a jira issue on this ?

>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

This is a bug. The cause is that the destination full check, for REMOVE_OLDEST/REMOVE_LOW_PRIORITY, to determine if removal needed doesn't include
the current message. When it's full, the current behavior does remove message(s) until enough room for a subsequent message add

Thanks,
amy

On 09/10/2013 06:15 PM, Okubo, Takuji wrote:

Hi,

We have a question about the behavior of the limitBehavior option. It seems that the behavior of this option is different between REJECT_NEWEST and REMOVE_OLDEST/REMOVE_LOWPRIORITY. I am not sure if this is a bug or working as designed. We think this maybe working as designed but we have difficulty in explaining this behavior in our Fujitsu Interstage product manual. Interstage uses Glassfish and OpenMQ internally. Could you please give us advise whether this is a bug or working as designed?

·Isssue

The behavior of limitBehavior is different between REJECT_NEWEST and REMOVE_OLDEST/REMOVE_LOWPRIORITY.

·Environment

Glassfish 4.0, OpenMQ 5.0

·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 5^th 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/.

You may think this is working as designed. However, it is possible that 1KB message is sent x 4 times and 10MB is sent at 5^th time when 5KB is limit. I have attached the sample program to reproduce the problem and the log file. Please tell us your thoughts. Thank you.

Regards,

Takuji




[mq-users] Question on limitBehavior option

Okubo, Takuji 09/11/2013

[mq-users] Re: Question on limitBehavior option

Amy Kang 09/12/2013
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close