[JBoss Messaging] - JBM with singleton MDB
by TheOverlord
I'm using JBM 1.4SP3 (or may be SP4), to send messages to a clustered MDB on multiple servers.
Now these MDBs are defined as MDB singletons (1 maximum MDB instance per server).
The reason for this is the MDB uses a native library that is not thread safe so it can not allow more than thread to enter at any given time, however, it's totally OK to have multiple of these MDBs running on different machines simultaneously.
What I found is that JBM will send messages to these MDBs in a round robin fashion but it doesn't seem to detect if a MDB is busy. My observations show that if a singleton MDB is busy and JBM chooses that MDB to consume it's messages, the message will wait on the queue even if other MDBs on other matches are idle.
Obviously the desired behavior is for JBM to know that a singleton MDB is not available (busy) and send it off to another MDB that is available. That does not appear to be happending.
I tried setting prefetch size to 1 but that did not help.
Any ideas on how to get this to work properly?
Conceptually what I'm trying to do is simple as mud but I can't get it to work properly.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247333#4247333
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247333
14 years, 8 months
[JBoss Messaging] - Re: JMSServerControl.createQueue() fails when there are any
by jmesnil
"clebert.suconic(a)jboss.com" wrote : IMO the management address shouldn' t be paged (ever).
You're right.
If I bypass paging for management message in PostOfficeImpl.route(), the issue disappears.
However, the message which is paged is the *reply* containing the operation result. It is not routed to the management address but (generally) to a temporary address. This means I can't use the message destination to bypass paging as it is not the management address.
The only way to know if the message corresponds to a management message is to lookup for a well-known property.
But this is not optimal as I don't want to lookup every message while only management message should never be paged.
So, I added a "pagingEnabled" boolean parameter to PostOffice.route().
When a *management message* is routed, I set it to false. Otherwise, it is true.
Then, in the route() method, I wrapped the paging code in a if(pagingEnabled) block.
This avoids to do any lookup to check if the message is a management message or not but it clutters a little bit the PostOffice API.
wdyt?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247312#4247312
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247312
14 years, 8 months