2008/4/28 kbrowna2w <[EMAIL PROTECTED]>: > > Fellow camel users, > > Camel is my latest hammer and as such I'm trying to use it to build http > notification support:
:) > An event for a given user will come in over some channel, and will be routed > to one of a finite number of urls that will be looked up in a database given > the user. > > So something like: > > start-->content-based-router-->(one of 400 http components created at > startup). This sounds a little bit like a Dynamic Recipient List where you use an expression to do the database lookup of the actual HTTP endpoint to use. http://activemq.apache.org/camel/recipient-list.html e.g. from("something").recipientList().method("someBean", "figureOutNextEndpoint"); where you have a bean something like this class SomeBean { public List<String> figureOutNextEndpoint(String payload) {... } } > But, I have a couple of questions > 1) URL s may be added or changed occasionally and will need to be updated > after x without restarting the app. Is it possible to add components after > the camel context is started? Sure > 2) If I don't want to have a thread per http component, it will be possible > for a down listener to slow my system to a crawl waiting 30 seconds for each > timeout. Is it possible to mark an http-component as temporarily down so it > will fail fast? Am sure we could patch the camel-http endpoint to handle this better. > 3) Is having 400 http components the wrong approach? Is there an > httpComponent that will handle multiple arbitrary URLs? You are talking about http client endpoints right? To POST stuff to some HTTP URL etc? If so the camel-http endpoints are pretty lightweight things; they don't own a thread or anything. So sending a message to the endpoint is synchronous in the calling thread. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
