# Bad Outputs moving from RabbitMQ to Rackspace Queueing

**URL:** <https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796>\
**Category:** Logstash\
**Created:** [June 16, 2015, 12:42pm UTC](https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796 "2015-06-16T12:42:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DKlotz](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@DKlotz](https://discuss.elastic.co/u/DKlotz)\
**Post date:** [June 16, 2015, 12:42pm UTC](https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796/1 "2015-06-16T12:42:48Z")

</div>

After running into some frustrations with RabbitMQ's stability, I am attempting to move to Rackspace's Queuing plugin.

I have 2 servers, one which populates the queue, one which pulls from the queue.

I have replaced the rules in my logstash instances with the equivalent in the rackspace plugin. However, now when my consumer server gets the messages, they have a bunch of backslashes and no longer are parsed cleanly into tags. I can see they're correct on the producer side.  
In example:  
{  
"message" =\> "2015-06-14 21:48:38 xxx.xxx.xxx.xxx PUT /www/ - 443 \r",  
"@version" =\> "1",  
"@timestamp" =\> "2015-06-15T20:43:40.021Z",  
"host" =\> "xxx.xxx.xxx.xxx",  
"type" =\> "iis"  
}

becomes this on the consumer side:  
"message" =\> "{"@version"=\>"1", "host"=\>"xxx.xxx.xxx.xxx", "type"=\>"iis", "message"=\>"2015-06-14 21:48:38 xxx.xxx.xxx.xxx PUT /www/ - 443 r", "@timestamp"=\>"2015-06-16T12:23:16.764Z"}",  
"@version" =\> "1",  
"@timestamp" =\> "2015-06-16T12:29:28.722Z",  
}

It looks like it takes the message and then adds the timestamp it pulled it from the queue on, and does nothing with the message.

I have tried using "plain" or "json" for the codec with no luck. Not sure what else to try to get it to parse properly, or remove the backslashes.

---

<div class="post-metadata">

**Author:** ![DKlotz](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@DKlotz](https://discuss.elastic.co/u/DKlotz)\
**Post date:** [June 16, 2015, 9:17pm UTC](https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796/2 "2015-06-16T21:17:20Z")

</div>

Based on testing. I realized that it does not actually encode into JSON before being sent.. I manually changed line:

```
  @rackspace_queue.messages.create :body => event, :ttl => @ttl

```

to:  
@rackspace\_queue.messages.create :body =\> event.to\_json, :ttl =\> @ttl

in the plugin.

since I was having trouble getting the @codec.encode(event) to work and my ruby isn't that good.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2015, 1:33am UTC](https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796/3 "2015-06-17T01:33:10Z")

</div>

Nice find!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:37am UTC](https://discuss.elastic.co/t/bad-outputs-moving-from-rabbitmq-to-rackspace-queueing/2796/4 "2017-07-06T05:37:16Z")

</div>


