My application will send requests to a remote system via XML-RPC, but the remote system does not queue or throttle requests in any way -- it is fairly trivial for my application to overload the remote system and make it crash. I don't think that the throttler pattern will work for my intended usage because I need to synchronize externally (clustered app; a DB tracks requests and the maximum number of requests per remote server) and because the remote system calls can take a different amount of time (throttler appears to work on max requests per unit time). I also cannot blindly wait for the resource to become available because my XA transaction will timeout.
Since my source endpoint is a JMS queue, I was thinking of implementing a "gate" that utilizes a QueueBrowser to peek at the messages. When it finds a message that can be processed, it consumes the message and puts it on another queue. The logic that sends it to the remote system can watch the second queue and blindly send the data. Has anyone encountered any situation like this before? Are there any recommend solutions? Thanks, Dan Nawrocki -- View this message in context: http://old.nabble.com/Handle-finite-number-of-remote-requests--tp28301621p28301621.html Sent from the Camel - Users mailing list archive at Nabble.com.
