You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by exabrial12 <ex...@gmail.com> on 2019/03/06 22:43:33 UTC

Re: MDB / JMS Consumer Throttling?

We ended up with a less than ideal solution for now. We're using camel to
slowly take messages off one queue and put them on another. This is not
ideal, because if the app is stopped, camel will keep moving messages. We
also had to exclude the `THROTTLE.>` destinations from being sent across any
network bridges (very important):

	<camel:camelContext id="camel">
		<camel:streamCaching
			id="throttleStreamCache"
			bufferSize="16384"
			spoolDirectory="${activemq.data}/spool"
			spoolThreshold="65536" />
		<camel:route streamCache="true">
			<camel:from
uri="activemq:queue:THROTTLE.com.xxx.applications.xxx.model.TextToContact"
/>
			<camel:throttle timePeriodMillis="7500">
				<camel:constant>1</camel:constant>
				<camel:to
uri="activemq:queue:com.xxx.applications.xxx.model.TextToContact" />
			</camel:throttle>
		</camel:route>
	</camel:camelContext>






--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html