Thanks for the tip about trying things outside of an MDB. The simple consumer test worked
and proved that the queues would pull messages around as needed to get the jobs done as
quick as possible. When doing the same type of test with an MDB it would never do this.
I spent hours tweaking little config files and I was about to give up and go to bed but
finally a long shot hit me, and it worked...
It seems that even though I'm adding messages using the ClusteredConnectionFactory,
this only works with a standard consumer. When you start using an MDB, it seems to step
in the middle of things and redirect it all to the old ConnectionFactory instead of the
clustered one. I even have the @Clustered annotation in my MDB and that doesn't make
it work correctly.
The solution was to simply add the following attributes to the standard ConnectionFactory
in the connections-factory-service.xml file:
| <attribute name="SupportsFailover">true</attribute>
| <attribute name="SupportsLoadBalancing">true</attribute>
| <attribute name="PrefetchSize">5</attribute>
|
Had to lower the PrefetchSize down to a small number instead of the large 150 or else they
will fetch 150 at a time and not let them go. I'm considering setting this to 1 to
ensure even distribution of messages. I have no idea what sort of penalty will be applied
for having such a low prefetch, but I cant imagine it would be too bad. If someone knows,
please enlighten us.
Thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130961#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...