Possible bug in amqp/ruote-amqp/jruby

11 views
Skip to first unread message

Asier

unread,
Jun 18, 2010, 6:38:27 AM6/18/10
to openwfe...@googlegroups.com
Hi all

I post here because I don't know where to post this question. Perhaps someone
could point me to the right place (amqp maintainer? jruby mailing list?). My
stack is tomcat 6.0.26 + jruby 1.4.1 + ruote 2.1.10 + ruote-kit + ruote-amqp
2.1.10

The bug is that amqp messages/workitems doesn`t get delivered to AMQP server.

After registering participants and launched a simpe workflow workitems won't
get dispatched to AMQP (RabbitMQ) server:

> - - [participants] - - - - - - - - - - - - - - - - - -
config.register do
require 'ruote-amqp'
AMQP.settings[:host] = '127.0.0.1'
AMQP.settings[:user] = 'guest'
AMQP.settings[:pass] = 'guest'
AMQP.settings[:logging] = true
participant :copper, RuoteAMQP::Participant,
:reply_by_default => true,
:default_queue => 'ruote'
# With this rackup I bundle as catchall, making it easy to experiment
catchall
end
> - - [/participants] - - - - - - - - - - - - - - - - - -


> - - [workflow] - - - - - - - - - - - - - - - - - - - - -
<process-definition name="secuencia">
<sequence>
<participant ref="copper" task="almacenamiento" queue="ruote"/>
<participant ref="alice" task="aprobacion"/>
</sequence>
</process-definition>
> - - [/workflow] - - - - - - - - - - - - - - - - - - - - -

If I launch one or more processes with this definition their workitems simply
don't go out of the engine to the AMQP server. Processes don't have any errors
and workitems (as expected by :reply_by_default parameter) gets dispatched to
'alice'.

But if I add:

AMQP.settings[:timeout] = 1

or any numeric value (except zero) and restart tomcat, only the *first*
launched process gets its workitem dispatched, the rest of new launched
processes have no workitem dispatched to AMQP server.

If I launch ruote-kit with rackup (under JRUBY 1.4.1) this behaviour repeats.
Also tested with JRUBY 1.5.1 with tomcat and rackup.

But if I launch ruote-kit with rackup under RUBY 1.8.7 it works OK: all
workitems get dispatched without problems.

Some pointer

Thanks

Asier

unread,
Jun 18, 2010, 8:08:54 AM6/18/10
to openwfe...@googlegroups.com
El 18/06/2010 12:38, Asier escribió:
> Hi all
>
> I post here because I don't know where to post this question. Perhaps
> someone could point me to the right place (amqp maintainer? jruby
> mailing list?). My stack is tomcat 6.0.26 + jruby 1.4.1 + ruote 2.1.10 +
> ruote-kit + ruote-amqp 2.1.10
>
> The bug is that amqp messages/workitems doesn`t get delivered to AMQP
> server.

I've found the bug.

It's related to eventmachine. Version 0.12.10-java silently "forgets" some
packets as reported in previous message. With 0.12.8-java an exception is
thrown when launching workflow instances.

Only with version 0.12.6 it works as expected without having to specify a
AMQP.settings[:timeout] value.

It's being a bit difficult to setup my ruote stack under windows + jruby:

+ cloche file locks aren't available under windows
+ JSON parser must be json_pure
+ tomcat deployment under webapps/ROOT
+ problems with participant paratemers with ruote-amqp
+ eventmachine must be 0.12.6-java

The good news is that this setup is begining to work so thanks to all the
people who has helped me, specially to John and his patience.

Greets

John Mettraux

unread,
Jun 18, 2010, 9:10:07 AM6/18/10
to openwfe...@googlegroups.com

On Fri, Jun 18, 2010 at 02:08:54PM +0200, Asier wrote:
> El 18/06/2010 12:38, Asier escribi�:

> >Hi all
> >
> >I post here because I don't know where to post this question. Perhaps
> >someone could point me to the right place (amqp maintainer? jruby
> >mailing list?). My stack is tomcat 6.0.26 + jruby 1.4.1 + ruote 2.1.10 +
> >ruote-kit + ruote-amqp 2.1.10
> >
> >The bug is that amqp messages/workitems doesn`t get delivered to AMQP
> >server.
>
> I've found the bug.

Hello Asier,

> It's related to eventmachine. Version 0.12.10-java silently
> "forgets" some packets as reported in previous message. With
> 0.12.8-java an exception is thrown when launching workflow
> instances.
>
> Only with version 0.12.6 it works as expected without having to
> specify a AMQP.settings[:timeout] value.

Ouch, if you have the time it would be cool to narrow down the issue to only JRuby and eventmachine so that we could pass a bug report to the EventMachine guys.

> It's being a bit difficult to setup my ruote stack under windows + jruby:
>
> + cloche file locks aren't available under windows
> + JSON parser must be json_pure
> + tomcat deployment under webapps/ROOT
> + problems with participant paratemers with ruote-amqp

What problems ? I thought I had them solved with http://github.com/jmettraux/ruote-amqp

> + eventmachine must be 0.12.6-java
>
> The good news is that this setup is begining to work so thanks to
> all the people who has helped me, specially to John and his
> patience.

Excellent.


Cheers,

--
John Mettraux - http://jmettraux.wordpress.com

Asier

unread,
Jun 18, 2010, 1:31:18 PM6/18/10
to openwfe...@googlegroups.com
On Viernes, 18 de Junio de 2010 15:10:07 John Mettraux escribió:

> Ouch, if you have the time it would be cool to narrow down the issue to
> only JRuby and eventmachine so that we could pass a bug report to the
> EventMachine guys.

I've opened an issue in the amqp github's issue control to inform that this
package works well under JRuby + eventmachine 0.12.6 so they can add a note in
his web page or rdoc to JRuby users. If I've the time to know the root of the
problem I'll open an issue in eventmachine github.

I'm also be tempted to use Ruby, but performance gains with JRuby is worth the
cost.

> > It's being a bit difficult to setup my ruote stack under windows + jruby:
> >
> > + cloche file locks aren't available under windows
> > + JSON parser must be json_pure
> > + tomcat deployment under webapps/ROOT
> > + problems with participant paratemers with ruote-amqp
>
> What problems ? I thought I had them solved with

> http://github.com/jmettraux/ruote-amqp0

Yes, this package is ok now. I was simply enumerating the problems that I've
found and solved. Perhaps if someone is going to setup a similar stack this
post could be helpful.

Regards

Reply all
Reply to author
Forward
0 new messages