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
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
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
> 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