catify/camel-websocket — Issue #14: Empty body and connectionKey with Akka integration
Author: rwfowler
Created: 2011-12-13 20:34:35+00:00
State: open

I'm using this project to get WebSocket communication to work with an Akka-based app I'm writing. The problem I ran into is that my Akka/Camel consumer gets a message, but the body is null, and the headers are incomplete. I managed to get things working by adding the following code to WebsocketConsumer.java and then disabling the tests in WebsocketConsumerTest.java.

```java
exchange.getIn().setHeader(WebsocketConstants.CONNECTION_KEY, connectionKey);
exchange.getIn().setBody(message);
```

I'm a newbie when it comes to looking at camel component code, but this makes some sense to me. Shouldn't a consumer always be dealing with "exchange.in" rather than "exchange.out"?

Thanks,
Ryan