I branched this to a different thread as I thought you were "hijacking" the thread to a slightly different question... ;-)
Sem ofensas :-)
The producer max-rate is determined at the Connection Factory, not at the Queue level.
You should probably have to create two instances of the RA.xml each one on different bindings.
We have a feature request already on user quotas, and that would probably supply this kind of request.
Thanks Clebert (again), that's interesting, how i can have 2 instance of the ra.xml? should i create a copy of the jms-ra.rar and then change the ra.xml? is there a better way to do that? (like only change the ra.xml and not have two copy's of the jms-ra.rar)
you dont need another ra.xml, basically this is the default, you can override any of the connection factory properties via the activation config, either on the MDB like
@ActivationConfigProperty(propertyName = "producerMaxRate", propertyValue = "12345")
or using the xml config but im not 100% on how you do that
Thank's Andy, well i try to setup the consumer (and the producer but in my case the MDB have to "consume" at some rate) in the ejb-jar.xml with this propertie:
<activation-config-property-name>consumerMaxRate</activation-config-property-name> <!-- i also try with the producerMaxRate -->
I have no luck with this, so i will try to create another instance of the ra.xml...
Well after all day doing sftw and rtfm i try to setup this propertie in the ra.xml but i have no luck, the problems it's very weird because in the first test it's seems to be send the message at the rate that was setted, but when i start to doing more test, the rate go to the maximun that a consumer can fecth a messagge.
The ejb-jar.xml have this mdb configured:
and in the ra.xml for that ejb i setup the "maxConsumerRate" at the desired rate... what i can do to fix the problem with the rate?
Just tested this on trunk and it works fine for me, i simple set the activation property as such
@ActivationConfigProperty(propertyName = "consumerMaxRate", propertyValue = "1")
and the MDB's consumed at 1 msg per second
yeah, so if you want to get a rate of 1 msg/s you have to setup the pool of MDB at 1 like:
@ActivationConfigProperty(propertyName = "consumerMaxRate", propertyValue = "1"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")