-
1. Re: Parameterizing max-rate producers through the Resource Adapter
clebert.suconic Feb 16, 2011 5:37 PM (in response to esanmartin)I branched this to a different thread as I thought you were "hijacking" the thread to a slightly different question... ;-)
Sem ofensas :-)
-
2. Re: Parameterizing max-rate producers through the Resource Adapter
clebert.suconic Feb 16, 2011 5:41 PM (in response to clebert.suconic)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.
-
3. Re: Parameterizing max-rate producers through the Resource Adapter
esanmartin Feb 17, 2011 7:54 AM (in response to clebert.suconic)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)
Regards
-
4. Re: Parameterizing max-rate producers through the Resource Adapter
ataylor Feb 17, 2011 8:44 AM (in response to esanmartin)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
-
5. Re: Parameterizing max-rate producers through the Resource Adapter
esanmartin Feb 17, 2011 9:16 AM (in response to ataylor)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>
<activation-config-property>
<activation-config-property-name>consumerMaxRate</activation-config-property-name> <!-- i also try with the producerMaxRate -->
<activation-config-property-value>2</activation-config-property-value>
</activation-config-property>
</activation-config>
I have no luck with this, so i will try to create another instance of the ra.xml...
-
6. Re: Parameterizing max-rate producers through the Resource Adapter
esanmartin Feb 17, 2011 4:04 PM (in response to esanmartin)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:
<message-driven>
<display-name>TestSenderMDB</display-name>
<ejb-name>TestSenderEJB</ejb-name>
<ejb-class>com.atichile.smsgateway.senders.kannel.TestSenderMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<activation-config>
<activation-config-property>
<activation-config-property-name>maxSession</activation-config-property-name>
<activation-config-property-value>1</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
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?
-
7. Re: Parameterizing max-rate producers through the Resource Adapter
ataylor Feb 18, 2011 4:43 AM (in response to esanmartin)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
-
8. Re: Parameterizing max-rate producers through the Resource Adapter
esanmartin Feb 23, 2011 8:28 AM (in response to ataylor)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")