`Invalid or undefined name: body` when using `EventBus.send` with time-out #27

ddossot opened this Issue Feb 28, 2014 · 4 comments


None yet

3 participants


Using the latest snapshot, this:

EventBus.send('animals.cows', 'test', 3000) do |message|


SEVERE: Exception in Ruby verticle: Invalid or undefined name: body
(snip)/target/mods/io.vertx~lang-jruby~2.1.0-SNAPSHOT/core/event_bus.rb:204:in `initialize'
(snip)/target/mods/io.vertx~lang-jruby~2.1.0-SNAPSHOT/core/event_bus.rb:190:in `handle'

To reproduce the issue, configure Vert.x langs.properties with jruby=io.vertx~lang-jruby~2.1.0-SNAPSHOT:org.vertx.java.platform.impl.JRubyVerticleFactory

Then vertx run test.rb the following:

require 'vertx'
include Vertx

EventBus.send('test', 'something', 2000) do |response|
  puts response
vert.x member

thank you @ddossot I'm looking at you issue and i'll keep you posted!


Thanks. FYI the same error occurs with Vert.x 2.1RC1 + Lang Ruby 2.0.1-SNAPSHOT (from Sonatype's repo, built Feb 1).


I had the same error and I printed the type of the "message" and it's appear that is a


It's normal the method can't find a body...
Maybe this observation can help to resolve the bug

For my test I just used a print in file event-bus.rb at line 204

201    def initialize(message)
203       @j_del = message
204       p message
205       if message.body.is_a? org.vertx.java.core.json.JsonObject
206         @body = JSON.parse(message.body.encode)
207       elsif message.body.is_a? org.vertx.java.core.buffer.Buffer
208         @body = Buffer.new(message.body)
209       else
210         @body = message.body
211       end
212     end
@pmarino90 pmarino90 closed this Apr 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment