How do I implement demand throttling in Java EE?

One of our applications accepts requests through a message queue and dials a phone call for each request.

The phone uses two telephony systems. One has a limit on the number of calls that can be initiated per second, but no limit on parallel calls, and the other system has a limit on the number of simultaneous calls that can be active at any given time.

A later request is processed at the Java EE layer, with a message queue with a predefined number of MDBs up to the limit.

Can anyone suggest how should I implement the first constraint (call initiation) in Java EE (weblogic 10.3) layer?

+3


source to share


1 answer


The only idea I came up with is to have multiple MDBs equal to the initiation limit and make them sleep for 1 second after the call is initiated and before the next message is received.



There might be a way to do this in a queue provider that is not necessarily accessible through JMS. You will need to check the documentation.

0


source







All Articles