Alexey
Alexey

Reputation: 123

Glassfish+ActiveMQ MDB processes message with 120 sec delay

I`ve configured MDB for listening to the Queue on external ActiveMQ broker. It works fine, but MDB takes a message from the queue and starts processing only after 2 minutes delay. I haven't configured any timeouts, but it really looks like there is a kind of property that delays the processing. Could someone advise how can I tune this delay and switch to immediate processing?

Upvotes: 4

Views: 316

Answers (1)

vaquar khan
vaquar khan

Reputation: 11479

It's an old bug in Glassfish for a long time.

There was a bug recorded here but now this site also closed . http://java.net/jira/browse/GLASSFISH-1429

Add System.exit(0) (in a finally block), which closes all threads.

try{
code ...

}finally{
 System.exit(0) ;
}

You can also enable debugging :

1) enable jstack to see how many threads from the mdb-thread-pool are in use.

2) try enabling monitoring statistics of work-manager and thread-pools : http://download.oracle.com/docs/cd/E19879-01/820-4335/6nfqc3qp8/index.html

Upvotes: 2

Related Questions