title: Redis: Wrong serialization using the camel-redis
body: <p>I'm playing with camel and redis. I have a very short route:</p>
  
  <pre><code>from("timer://foo?period=5s")
      .to("http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson")
      .split().method(SplitFeatures.class,"splitMessage")
      .to("spring-redis://localhost:6379?command=SET&amp;serializer=#serializer");
  </code></pre>
  
  <p>Where splitMessage is the following:</p>
  
  <pre><code>public static List&lt;Message&gt; splitMessage(@Body String body) throws IOException {
  
      List&lt;Message&gt; answer = new ArrayList&lt;Message&gt;();
      JsonParser parser=new JsonParser();
      JsonObject jo=(JsonObject)parser.parse(body);
  
      // I care only for the features array
      JsonArray features=jo.get("features").getAsJsonArray();
  
      for (JsonElement feature: features) {
           Message msg=new DefaultMessage();
           JsonObject jof=feature.getAsJsonObject();
  
           // get the key
           String id=jof.get("id").getAsString().toString();
  
           System.out.print(id);
           msg.setHeader(RedisConstants.KEY, id);
           msg.setHeader(RedisConstants.VALUE, jof.toString());
           answer.add(msg);
      }
      return answer;
  }
  </code></pre>
  
  <p>Everything runs smoothly, but when I check the redis db I see that the key is:</p>
  
  <pre><code> "\xac\xed\x00\x05t\x00\nci11361338"
  </code></pre>
  
  <p>and the same prefix <code>"\xac\xed\x00\x05t\x00"</code> is in the value.</p>
  
  <p>Obviously the those printed by the System.out look fine.</p>
  
  <p>As you see I tried to add a serializer, a StringRedisSerializer that I defined in the Main like this:</p>
  
  <pre><code>    Main main = new Main();
  main.bind("serializer", new StringRedisSerializer());
  </code></pre>
  
  <p>But the result is the same (also using GenericToStringSerializer).</p>
  
  <p>Is there something I'm missing?</p>