-
1. Re: JBM with singleton MDB
clebert.suconic Jul 31, 2009 2:22 PM (in response to theoverlord)On JBM 1.4, the JCA adapter is part of the application server. So MDBs are not really part of JBoss Messaging 1.4. (Differently on JBM 2, as we are writing our own JCA adapter).
I suggest you ask this on the JCA Forum (http://www.jboss.org/index.html?module=bb&op=viewforum&f=136)
But anyway, you could also make the method onMessage of your MDB synchronized. So you would solve the multi-thread issue you have at your native lib. -
2. Re: JBM with singleton MDB
theoverlord Jul 31, 2009 4:37 PM (in response to theoverlord)"clebert.suconic@jboss.com" wrote:
But anyway, you could also make the method onMessage of your MDB synchronized. So you would solve the multi-thread issue you have at your native lib.
My onMessage is already synchronized but it doesn't really solve my problem.
A thread can be blocked and idling because the onMessage is currently used, however, other MDBs on other machines are doing absolutely nothing and waiting for messages. The waiting part is what I'm trying to avoid. -
3. Re: JBM with singleton MDB
clebert.suconic Jul 31, 2009 5:22 PM (in response to theoverlord)If I understand correctly, you need to set slowConsumer=true on the ConnectionFactory used by the MDB. You probably don't want any buffer on the client, as you want the message to be round robbed to other servers.
It' s a bit obscure what you are trying to achieve here.. so I' m suggesting that based on what I understood. -
4. Re: JBM with singleton MDB
theoverlord Jul 31, 2009 6:05 PM (in response to theoverlord)"clebert.suconic@jboss.com" wrote:
If I understand correctly, you need to set slowConsumer=true on the ConnectionFactory used by the MDB. You probably don't want any buffer on the client, as you want the message to be round robbed to other servers.
It' s a bit obscure what you are trying to achieve here.. so I' m suggesting that based on what I understood.
You seem to understand what I'm trying to do.
I want maximum throughput of whatever the MDB is doing while honoring the requirements that only one thread can enter the MDB onMessage at a time.
Messages should not wait for a MDB that's busy. If it's busy, it should go another MDB that is not busy. If all MDBs are busy, it should wait until one isn't busy.
Very simple.
I will try the slowConsumer thing to see if it works. -
5. Re: JBM with singleton MDB
clebert.suconic Jul 31, 2009 6:23 PM (in response to theoverlord)Cool.. I think it will work then.
All you need is to configure the slowconsumer at the Connection Factory used by the JmsXA.
BTW: I meant "it's a bit obscure to *me*".. as the problem being me.. not you. :-)
(I missed the me because of a typo).
Cheers. -
6. Re: JBM with singleton MDB
theoverlord Jul 31, 2009 7:43 PM (in response to theoverlord)I tried setting slowConsumers to true but it didn't work.
The way I test this is that on one server, I set a debug break point at the start of the MDB onMessage method.
After a message hits that break point, i'll send more messages. They'll round robin to the other servers but none should return to the server that has hit that break point, but it does !!!
So basically the JBM seems to be not aware that the MDB is preoccupied.
I would imaging that once a server's MDB pool is exhausted, JBM will choose to use another one from some other server before waiting for one to become available - am I correct in that assumption? -
7. Re: JBM with singleton MDB
timfox Aug 1, 2009 6:48 AM (in response to theoverlord)As Clebert mentioned, MDBs are *not* part of JBoss Messaging - JBM has no knowledge of MDBs.
MDBs exist as part of JBoss AS. MDBs provide their own pooling and buffering of messages which is not part of JBM.