Hey guys,

Sorry to open this thread again, but I have been trying to accomplish the 
same thing (Jetty), but haven't had any luck. I have read through this 
<http://doc.akka.io/docs/akka/snapshot/scala/camel.html>but still feel 
quite stranded. Almost all documentation outside that page is for 
direct-java or DSL implementations, whereas with akka you extend the 
Consumer class, define your endpoint, and you're good to go. I'm afraid to 
start blindly hacking my way to raw camel objects because I don't know how 
Akka implements the underlying camel objects and am nervous I will start 
hardwiring to stuff I don't completely understand or creating duplicate 
instances or other unintended consequences that will give me more problems 
than solutions.

Up to this point I have handles to my JettyHttpComponent and CamelContext 
in my Consumer actor constructor. Cedric mentioned a custom Processor, so I 
am guessing I can get the client IP from the Exchange object somehow. If I 
were to figure that out, I'm not sure how I would wire that into my 
consumer actor. Would I define it in my endpoint string which would then 
point to the actual definition elsewhere, or do I somehow override a 
consumer method? I haven't found any methods in either the 
JettyHttpComponent/CamelContext objects that I think would do the trick.

Any additional hints or musings would be greatly appreciated!

On Thursday, November 14, 2013 2:31:55 AM UTC-8, √ wrote:
>
> Happy hAkking!
>
>
> On Thu, Nov 14, 2013 at 11:29 AM, Cédric Sougné 
> <[email protected]<javascript:>
> > wrote:
>
>> finally got it by adding a Processor to the camel RouteDefinition. the 
>> Processor add a header to the camelmessage with source address.
>>
>> Thanks for RTFM reminder :-)
>>
>> Le mercredi 13 novembre 2013 15:22:35 UTC+1, Cédric Sougné a écrit :
>>
>>> I see nothing about that on the camel-jetty component page but googling 
>>> telled me that I should be able to retrieve Jetty's HttpServletRequest 
>>> object. This contains the complete client address information. The question 
>>> is how to retrieve this from the consumer actor?
>>>
>>> Le mercredi 13 novembre 2013 14:13:05 UTC+1, √ a écrit :
>>>>
>>>> What does the Camel Jetty component documentation say?
>>>>
>>>>
>>>> On Wed, Nov 13, 2013 at 1:36 PM, Cédric Sougné <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm trying to get client ip address using akka-camel consumer actor 
>>>>> and the jetty:http: camel component.
>>>>>
>>>>> Inspecting headers, I've found a _remoteaddr from 
>>>>> camelHttpServletRequest but value is null.
>>>>>
>>>>> Thanks for your suggestions.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Cédric
>>>>>
>>>>>
>>>>>
>>>>>  -- 
>>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>> >>>>>>>>>> Search the archives: https://groups.google.com/
>>>>> group/akka-user
>>>>> --- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Akka User List" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Cheers,
>>>> √
>>>>
>>>> * Viktor Klang*
>>>> *Director of Engineering*
>>>> Typesafe <http://www.typesafe.com/>
>>>>
>>>> Twitter: @viktorklang
>>>>  
>>>  -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Cheers,
> √
>
> * Viktor Klang*
> *Director of Engineering*
> Typesafe <http://www.typesafe.com/>
>
> Twitter: @viktorklang
>  

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to