on 03-28-2006 11:26 AM
Hi all,
I've a few questions for the JMS Gurus on SAP Web AS.
I'm sending some messages into a JMS queue with the sender's time to live factor set to 30 seconds. The provider does set the JMS expiration time based on this parameter. But the expired messages are not at all removed from the queue by the JMS service. They stay there forever.
Won't the JMS service cleanup the expired messages from the queue?
I've set the clean Up Service Interval to 5 minutes for the JMS Service provider.
Why do the expired messages are not cleared automatically?
What are the configuration settings that I need to set in the JMS provider to do the cleanup automaticaly?
Thanks in advance
- Madhu
Hi Madhu,
Which server version are you using and why do you think that they are staying in the queue ?
Did you check that by the usage of javax.jms.QueueBrowser or by some other means ?
Best Regards
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
First of all thanks for the reply.
I used QueueBrowser to see how many messages were piled up on the queue. Here is the sample data for two random messages.
message - 1
JMS Timestamp Tue Mar 28 12:40:29 GMT+05:30 2006
JMS Message ID ID:0FDEA03F096A87C8-000000041EE5
JMS Correlation ID null
Expiration Tue Mar 28 12:40:59 GMT+05:30 2006
message - 2
JMS Timestamp Tue Mar 28 11:38:24 GMT+05:30 2006
JMS Message ID ID:0FDE9EE813C5C0C8-000000040D92
JMS Correlation ID null
Expiration Tue Mar 28 11:38:54 GMT+05:30 2006
1. Note that the time to live for the sender is set to 30 seconds.
2. The cleanUpServiceSleepInterval(of JMS Provider) is set to 5 mins(ie. 300000 ms)
3. The queue browsed time was Tue Mar 28 19:32 GMT+5:30 2006.
Given the above data it is almost 8 hours till the messages expired but still these were not removed from the queue. I'm clueless why these messages are not removed from the queue by the provider. There were 68 expired messages that I found when i browsed the queue.
Let me know if you need more info on the same.
Thanks,
- Madhu
Hi Madhu,
It seems strange, I can think of several possible reasons.
- You have called
myMessageProducer.setDisableMessageTimestamp (true) providing a hint to the provider that you don't need such functionality - expiration and timestamps.
-You have initialized and created your broswer much prior to 19:32 GMT, and you have called getEnumeration() at 19:32. So you have seen some cached old data. Please make sure to create the Browser each time you want to browse the queue to get the most accurate and uptodate results.
- There is some internal problem preventing the cleanup of the messages. Have you checked the log for jms exceptions ? It can be found at
\usr\sap\<sid>\<instance num>\j2ee\cluster\server0\log
Btw, what server version are you using ?
And is this only affecting the queue browsers ? Can you check if you can see those expired messages with a regular QueueReceiver ?
Best Regards
Peter
Hi Peter,
I'm sorry for the delayed response. Here are my responses to your questions in the same order.
1. I am not calling any other methods of the JMS API other than the setTimeToLive on the QueueSender.
2. The creation of the queue browser and the iteration through the elements in the enumeration are done in a test web page which takes less than 300 milli seconds between the creation and the actual peeking into the queue. There is no time lag between these two operations.
3. The log file(defaultTrace.trc) does not contain any strange exception(s) being thrown out.
Here is my system details...
Name: Java HotSpot(TM) Server VM
Vendor: Sun Microsystems Inc.
Version: 1.4.2_09-b05
VM Parameters
Cluster
Node ID: 1370250
Kernel Version: 6.40 PatchLevel 89291.313
sap.com/SAP-JEE 6.40 SP11 (1000.6.40.11.0.20050211020115)
Thanks,
- Madhu
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.