[ 
https://issues.apache.org/jira/browse/CAMEL-9392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavlo Kletsko updated CAMEL-9392:
---------------------------------
    Issue Type: New Feature  (was: Bug)

> Add ability to pass parameters within websocket url and handle them in onOpen 
> event 
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9392
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9392
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-atmosphere-websocket
>            Reporter: Pavlo Kletsko
>              Labels: patch
>             Fix For: 2.17.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> To give more dynamic for my app I need to send some additional information at 
> the moment client connect to server through websocket. 
> So the URL will be like :
> ws://localhost:" + PORT + "/hola1?param1=value1&param2=value2
> There is no limit of parameters for that moment of time.
> To use this parameters : they will be added to header as key/value and send 
> with onOpen event.
> Solution:
> 1) create map when service method is called at WebsocketConsumer such as 
> this.queryMap = getQueryMap(request.getQueryString());
> 2) add them to header when sendEventNotification triggered :
>         for (Map.Entry<String, String> param : queryMap.entrySet()) {
>              exchange.getIn().setHeader(param.getKey(), param.getValue());
>         }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to