You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lw <li...@gmail.com> on 2016/07/26 16:44:35 UTC

camel restlet usage

Hello everyone, 
I want to get a better idea on internal server process that gets created
when camel restlet is used. So far I have these 2 endpoints in production: 
    <from
uri="restlet:http://localhost:29123/camel/cms/bulkLoader?restletMethods=get,post"/>
    <from
uri="restlet:http://localhost:29124/camel/rdf/bulkLoader?restletMethods=get,post"/>
The 2 endpoints I use on a very rare occasions for bulk loading data, but
the endpoints are always available, so the processes are always running. 
My understanding is that I have 2 separate internal servers running at the
same time, although I rarely use them. 
Would it be better to use the same port instead of two? Should I keep the
script commented out until I actually need to run them? 

I have a task right now in test that's set up a third endpoint:
    <from
uri="restlet:http://localhost:29125/camel/otv/item/update?restletMethods=get,post"/>
This end point is going to get hit externally with regularity of about 200
times in 24 hours. Is this a good use for a restlet? Or would it be better
to set up a server?
Also, would it be better to use the same port for all 3 endpoints? 
Thank you for your time. lw



--
View this message in context: http://camel.465427.n5.nabble.com/camel-restlet-usage-tp5785477.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel restlet usage

Posted by lw <li...@gmail.com>.
Thank you for the input  Souciance. I'll give it a try and switch to the same
port.  



--
View this message in context: http://camel.465427.n5.nabble.com/camel-restlet-usage-tp5785477p5785502.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel restlet usage

Posted by lw <li...@gmail.com>.
I tried to use the same port and got these errors below, so no go there.
org.apache.camel.RuntimeCamelException: java.net.BindException: Address
already in use
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1642)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333)
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:776)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
        at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
        at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
        at
cms.extension.listener.integration.context.loaders.FileContextLoader.restart(FileContextLoader.java:48)
        at
cms.extension.listener.integration.context.loaders.FileContextLoader$2$1.process(FileContextLoader.java:67)
        at
org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:442)
        at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:214)
        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:178)
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use




--
View this message in context: http://camel.465427.n5.nabble.com/camel-restlet-usage-tp5785477p5785505.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel restlet usage

Posted by souciance <so...@gmail.com>.
Hi Lw

I don't see a problem using the same port for the first two services.

For the third service, you get use the same port here too, 200 times in 24h
hours is not much. It depends more on the amount of data you are receiving.
If there is no particular requirement then all three can use the same port.

Best
Souciance

On Tue, Jul 26, 2016 at 6:44 PM, lw [via Camel] <
ml-node+s465427n5785477h50@n5.nabble.com> wrote:

> Hello everyone,
> I want to get a better idea on internal server process that gets created
> when camel restlet is used. So far I have these 2 endpoints in production:
>     <from uri="restlet:
> http://localhost:29123/camel/cms/bulkLoader?restletMethods=get,post"/>
>     <from uri="restlet:
> http://localhost:29124/camel/rdf/bulkLoader?restletMethods=get,post"/>
> The 2 endpoints I use on a very rare occasions for bulk loading data, but
> the endpoints are always available, so the processes are always running.
> My understanding is that I have 2 separate internal servers running at the
> same time, although I rarely use them.
> Would it be better to use the same port instead of two? Should I keep the
> script commented out until I actually need to run them?
>
> I have a task right now in test that's set up a third endpoint:
>     <from uri="restlet:
> http://localhost:29125/camel/otv/item/update?restletMethods=get,post"/>
> This end point is going to get hit externally with regularity of about 200
> times in 24 hours. Is this a good use for a restlet? Or would it be better
> to set up a server?
> Also, would it be better to use the same port for all 3 endpoints?
> Thank you for your time. lw
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/camel-restlet-usage-tp5785477.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/camel-restlet-usage-tp5785477p5785483.html
Sent from the Camel - Users mailing list archive at Nabble.com.