this.queueName = name;
this.rackFactory = context.getRackFactory();
}
public void onMessage(Message message) {
RackApplication app = null;
try {
app = rackFactory.getApplication();
Ruby runtime = app.getRuntime();
RubyModule mod = runtime.getClassFromPath("JRuby::Rack::Queues");
IRubyObject obj = mod.getConstant("Registry");
rubyObjectAdapter.callMethod(obj, "receive_message", new IRubyObject[] {
JavaEmbedUtils.javaToRuby(runtime, queueName),
JavaEmbedUtils.javaToRuby(runtime, message)});