You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/10/17 14:36:00 UTC

[GitHub] [camel-k-runtime] nicolaferraro commented on issue #69: HTTP multi-headers are randomized in camel-knative-http

nicolaferraro commented on issue #69: HTTP multi-headers are randomized in camel-knative-http
URL: https://github.com/apache/camel-k-runtime/issues/69#issuecomment-543204716
 
 
   Still present on latest version.
   
   Scenario:
   
   integration 1
   ```
   from('timer:tick')
     .setBody().constant("message")
     .to('knative:channel/messages')
   
   from('timer:tick')
     .setBody().constant("word")
     .to('knative:channel/words')
   ```
   
   integration 2:
   ```
   from('knative:channel/messages')
     .transform().simple('transformed ${body}')
     .log('Forwarding: ${body}')
     .to('knative:channel/words')
   ```
   
   integration 3:
   ```
   from('knative:channel/messages')
     .log('From messages: ${body}')
     .to('log:messages?showHeaders=true')
   
   from('knative:channel/words')
     .log('From words: ${body}')
     .to('log:words?showHeaders=true')
   ```
   
   
   Technically only 3 messages should be printed by integration 3:
   ```
   From words: word
   From messages: message
   From words: transformed message
   ```
   
   But sometimes I get:
   ```
   From messages: transformed message
   ```
   
   
   Looking at the headers, I see they are randomized:
   
   Case 1:
   ```
   knativemultihop3-plqdx-deployment-74c5bfb57c-hl27h integration 2019-10-17 14:30:11.566 INFO  [vert.x-eventloop-thread-1] route2 - From words: transformed message
   knativemultihop3-plqdx-deployment-74c5bfb57c-hl27h integration 2019-10-17 14:30:11.567 INFO  [vert.x-eventloop-thread-1] words - Exchange[ExchangePattern: InOut, Headers: {Accept-Encoding=gzip, CamelHttpMethod=POST, CamelHttpPath=, CamelHttpQuery=null, CamelHttpUri=/, Ce-Knativehistory=[words-kn-channel.default.svc.cluster.local, messages-kn-channel.default.svc.cluster.local], Content-Length=19, Forwarded=for=172.17.0.18;proto=http, Host=knativemultihop3.default.svc.cluster.local, User-Agent=Go-http-client/1.1, X-B3-Parentspanid=caaf9276d3264172, X-B3-Sampled=0, X-B3-Spanid=effe710e68739a37, X-B3-Traceid=b6a3dfa9d50abc9f9dc41c7803c25ec8, X-Envoy-Decorator-Operation=knativemultihop3-plqdx.default.svc.cluster.local:80/*, X-Envoy-Expected-Rq-Timeout-Ms=600000, X-Envoy-Internal=true, X-Forwarded-For=172.17.0.18, 172.17.0.9, X-Forwarded-Proto=http, X-Request-Id=7ac64e5c-a8d9-9d73-b6db-a904afb4e5cc}, BodyType: byte[], Body: transformed message]
   ```
   
   
   Case 2:
   ```
   knativemultihop3-plqdx-deployment-74c5bfb57c-hl27h integration 2019-10-17 14:30:12.581 INFO  [vert.x-eventloop-thread-1] route1 - From messages: transformed message
   knativemultihop3-plqdx-deployment-74c5bfb57c-hl27h integration 2019-10-17 14:30:12.582 INFO  [vert.x-eventloop-thread-1] messages - Exchange[ExchangePattern: InOut, Headers: {Accept-Encoding=gzip, CamelHttpMethod=POST, CamelHttpPath=, CamelHttpQuery=null, CamelHttpUri=/, Ce-Knativehistory=[messages-kn-channel.default.svc.cluster.local, words-kn-channel.default.svc.cluster.local], Content-Length=19, Forwarded=for=172.17.0.18;proto=http, Host=knativemultihop3.default.svc.cluster.local, User-Agent=Go-http-client/1.1, X-B3-Parentspanid=6240cbbfd50bc5ec, X-B3-Sampled=0, X-B3-Spanid=9f6716a0ffd5b461, X-B3-Traceid=26669ebb2cf36e75c32df7ae62add8e8, X-Envoy-Decorator-Operation=knativemultihop3-plqdx.default.svc.cluster.local:80/*, X-Envoy-Expected-Rq-Timeout-Ms=600000, X-Envoy-Internal=true, X-Forwarded-For=172.17.0.18, 172.17.0.9, X-Forwarded-Proto=http, X-Request-Id=5141fe62-5122-9f70-8983-c4c5023ad3cb}, BodyType: byte[], Body: transformed message]
   ```
   
   Note that the component seems to take the first value of that header, which is the wrong way to deal with it, since channels are always appended as they are encountered.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services