# RabbitMQ output + Compress spooler: "wrong number of arguments"

**URL:** <https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631>\
**Category:** Logstash\
**Created:** [November 16, 2015, 1:00am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631 "2015-11-16T01:00:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceekay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ceekay/32/5687_2.png) [@ceekay](https://discuss.elastic.co/u/ceekay)\
**Post date:** [November 16, 2015, 1:00am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/1 "2015-11-16T01:00:58Z")

</div>

I'm trying to use the compress spooler codec on a previously-working RMQ output, but encoding is failing with `Error encoding event {:exception=>#<ArgumentError: wrong number of arguments (1 for 2)> ... `.

I've stripped my config down to basic input/output and can reproduce it with the following:

> input {  
> generator {  
> count =\> 10  
> message =\> "test"  
> }  
> }

> output {

> rabbitmq {  
> codec =\> compress\_spooler {  
> spool\_size =\> 10  
> }  
> exchange =\> "from-ingress"  
> exchange\_type =\> "direct"  
> host =\> "dev-queue1"  
> key =\> "filter-routing-key"  
> ssl =\> "true"  
> port =\> "5671"  
> user =\> "logstash\_user"  
> password =\> "[not\_telling]"  
> durable =\> "true"  
> persistent =\> "true"  
> }  
> }

It seems to be an interaction between rabbitmq and compress\_spooler, as other outputs I've tried (file, stdout, tcp) don't throw this error.

Can anyone else reproduce this and maybe shed some light on the cause?

---

<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:** [November 16, 2015, 3:43am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/2 "2015-11-16T03:43:05Z")

</div>

What version of LS and the plugin are you using?  
What OS (and version)?  
What Java version and release?

---

<div class="post-metadata">

**Author:** ![ceekay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ceekay/32/5687_2.png) [@ceekay](https://discuss.elastic.co/u/ceekay)\
**Post date:** [November 17, 2015, 9:50pm UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/3 "2015-11-17T21:50:38Z")

</div>

Hey @warkolm

Not sure why I didn't include versions 😕

Ubuntu 14.04.3  
LS 2.0.0-1  
logstash-output-rabbitmq 3.0.5  
logstash-codec-compress\_spooler 2.0.2  
Openjdk 7u79-2.5.6-0ubuntu1.14.04.1

---

<div class="post-metadata">

**Author:** ![ceekay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ceekay/32/5687_2.png) [@ceekay](https://discuss.elastic.co/u/ceekay)\
**Post date:** [November 23, 2015, 10:10pm UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/4 "2015-11-23T22:10:58Z")

</div>

\*bump\*

@warkolm - any ideas?

---

<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:** [November 25, 2015, 6:50am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/5 "2015-11-25T06:50:26Z")

</div>

I think this would be worth raising as an issue here - [https://github.com/logstash-plugins/logstash-output-rabbitmq/issues](https://github.com/logstash-plugins/logstash-output-rabbitmq/issues)

---

<div class="post-metadata">

**Author:** ![oriol](https://avatars.discourse-cdn.com/v4/letter/o/7cd45c/32.png) [@oriol](https://discuss.elastic.co/u/oriol)\
**Post date:** [September 26, 2016, 1:28am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/6 "2016-09-26T01:28:26Z")

</div>

@ceekay - any updates? are u still having same issue? I am reproducing the same behavior when logstash is communicating to Rabbitmq using compress\_spooler...  
it works without compress\_spooler but I don't want to submit uncompressed packages that contain only one line to Rabbitmq... did you find any alternative?

---

<div class="post-metadata">

**Author:** ![ceekay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ceekay/32/5687_2.png) [@ceekay](https://discuss.elastic.co/u/ceekay)\
**Post date:** [September 26, 2016, 1:52am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/7 "2016-09-26T01:52:49Z")

</div>

@oriol we ended up dropping compress\_spooler and writing our own codec with similar functionality. This also needs a slightly tweaked RabbitMQ plugin to ensure there's no message loss on shutdown, and we're still waiting on PR acceptance for that so we can't really release what we have until that happens.

I'll update this thread when there's some movement there.

---

<div class="post-metadata">

**Author:** ![L4rS6](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@L4rS6](https://discuss.elastic.co/u/L4rS6)\
**Post date:** [January 16, 2017, 10:52am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/8 "2017-01-16T10:52:58Z")

</div>

still no updates on this issue? I'm having the same problem with RabbitMQ 3.6.6, Logstash 2.4.1 and logstash-codec-compress\_spooler 2.0.4

---

<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, 4:29am UTC](https://discuss.elastic.co/t/rabbitmq-output-compress-spooler-wrong-number-of-arguments/34631/9 "2017-07-06T04:29:21Z")

</div>

Closed on July 6, 2017, 4:29am UTC


