This discussion is archived
0 Replies Latest reply: Mar 1, 2012 10:15 AM by 921194 RSS

Throttling in OSB

921194 Newbie
Currently Being Moderated
I have been trying to throttle the number of outbound messages from OSB to an external web service. I have used a work manager that restricts the max number of threads to 1. I assigned this work manager to both the Proxy and Business service that I am using. My proxy service is consuming messages from a JMS queue. I checked "Is Response Required" and also checked "Synchronous Transactional". I wanted to make the process wait for a response to the external web service. However, even though it takes 30 seconds on average for the web service to process a message I send, the Proxy Service appears to empty the queue at a rate of about 1 or 2 per second. Is there a way to make the process wait to send another message from the queue until it gets a response from the external web service? Also, is there a way to just put a wait in the process to slow it down?

I know that we can also do throttling at the Business service layer, but I don't want to have a bunch of messages queued on the in memory queue since we want gaurenteed delivery. I also wouldn't want to make the in memory queue too small which would result in losing messages because requests are coming in that can't be handled by the business service.

How have others handled throttling? Can I do a wait in OSB without doing a Java callout?

Also, I interested in how the Work Manager handles messages. If I have the same Work Manager for both the business service and the proxy service does the proxy service keep sending messages to the business service and if the business service can't handle the message at the current time does it put it on an in memory queue? If the business service's in memory queue is full does it drop a message that the Proxy Service sends. Or how do the business service and proxy service interact given that they are using the same business service that has a max thread count of 1?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points