do you remember Hartog's ping pong blog post ?
http://simplic.it/blog/an-investigiation-into-ruote-and-amqp
The complete example may be found at
https://github.com/coffeeaddict/ruote-amqp-ping-pong
Unfortunately, the example is stuck in 2010.
I went a bit further and tried to renovate it at
https://github.com/jmettraux/ruote-amqp-ping-pong
https://github.com/jmettraux/ruote-amqp-ping-pong/commit/95ec0cffc621552b80cb9b29435695c7a56a5dc6
Hoping to quickly win and submit a pull request. Unfortunately I lost that bet.
The engine says "ping", the "ping" participant catches the message and puts it back on the "ruote_workitems" queue and after that, nada. The engine's receiver doesn't pick it up.
Kenneth, David, Hartog, you guys have more experience with ruote and Amqp, would you know, what's wrong with the example ?
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
Hi John
I'll dive in with you tomorrow morning to get this updated properly. I
have a pull request on daemon-kit that should help fix this as well.
Kind regards
--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
@kennethkalmer
Hello Kenneth,
great !
Not an immediate concern, but I was wondering if you were using the 0.7.0 Amqp gem. I tried the 0.7.1 and it broke too many things. The Ruby-Amqp have been gently lobbying 0.8.0 (they are at rc5 it seems). Were you thinking about upgrading to 0.8.0 sooner or later when it goes out of rc ?
Cheers,
Hi John
I'll have to layer it up and see. I just looked at a current
ruote-amqp 2.2.x project and I'm using amqp 0.7.0 with ruote-amqp, and
amqp 0.6.7 in the remote participant and it works. I'll have a coffee
while I think this through, maybe I can bump ruote-amqp and daemon-kit
to use 0.8.0.
I'll use the ping-pong example to test this, if it works well we just
need to coordinate the version bump of ruote-amqp with David. I'll
ping the daemon-kit list and the new contributors over there about the
0.8 rc as well.
Ciao !
Hello,
yesterday I tried to move ruote-amqp to Amqp 0.7.1 but it was generally broken, 0.7.1 being too close to 0.8.0.
Hartog told me Amqp 0.8.x was an excellent thing. They're reorganizing their stuff "the right way".
Then I had this exchange on Twitter
https://twitter.com/#!/rubyamqp/status/73727111336181761
https://twitter.com/#!/rubyamqp/status/73727700958846976
https://twitter.com/#!/rubyamqp/status/73728089217187840
https://twitter.com/#!/rubyamqp/status/73728660263276546
https://twitter.com/#!/rubyamqp/status/73729186728120320
Shouldn't be too much work to go 0.8, but since you have quite a consequent infra on 0.7.0, better to have you on the board.
Took a lil' trip down memory lane.
The first questions that pop in to my mind are:
- what do the logs of the ping and pong daemon say
- what does `rabbitmqctl list_queues` say? (Perhaps you're listening
on the wrong queue)
Grtz,
Hartog.
Hello Hartog,
https://gist.github.com/raw/995206/f70a815f777578e393b85b61dc3bdd332d3904b3/ping.log
https://gist.github.com/raw/995210/ffa1054f3be6308735812b5a1696699e77dbfdf1/pong.log
and
---8<---
jmettraux@sanma ~/w/ruote-amqp-ping-pong/pong (master) 円 rabbitmqctl list_queues
Listing queues ...
...done.
--->8---
Thanks,
➜ ~ rabbitmqctl list_queues
Listing queues ...
work1 0
...done.
A bit weird. No pong, no ping, no ruote_workitems. But, perhaps I'm expecting something that isn't supposed to be.
ping work does get to the Ping worker:
[daemon-kit]: DaemonKit (0.1.8.1) booting in development mode
[daemon-kit]: Setting up trap for USR1
[daemon-kit]: Setting up trap for USR2
[daemon-kit]: Setting up trap for HUP
[daemon-kit]: Setting up trap for INT
[daemon-kit]: Setting up trap for TERM
[daemon-kit]: DaemonKit (0.1.8.1) booted, now running ping
[daemon-kit]: AMQP.start({:vhost=>"ruote", :pass=>"ruote", :user=>"ruote", :host=>"localhost"})
[daemon-kit]: Subscribing to ping for workitems
[daemon-kit]: Received workitem: "{\"participant_name\":\"ping\",\"fields\":{\"count\":0,\"dispatched_at\":\"2011-05-27 14:45:31.516024 UTC\",\"__result__\":0,\"params\":{\"participant_options\":{\"forget\":false,\"queue\":\"ping\"},\"command\":\"/ping/ping\",\"reply_queue\":\"ruote_workitems\",\"ref\":\"ping\"},\"state\":\"alpha\"},\"fei\":{\"wfid\":\"20110527-bezarabuda\",\"engine_id\":\"engine\",\"expid\":\"0_1_0\",\"subid\":\"1e4efeabf54867e9b85f3c3db9a52cc2\"}}"
Processing!!!
[daemon-kit]: Replying to engine via AMQP with #<DaemonKit::RuoteWorkitem:0x1015869f0 @workitem={"participant_name"=>"ping", "fields"=>{"count"=>1, "success"=>true, "__result__"=>0, "dispatched_at"=>"2011-05-27 14:45:31.516024 UTC", "params"=>{"participant_options"=>{"forget"=>false, "queue"=>"ping"}, "command"=>"/ping/ping", "ref"=>"ping", "reply_queue"=>"ruote_workitems"}, "state"=>"ping"}, "fei"=>{"wfid"=>"20110527-bezarabuda", "engine_id"=>"engine", "expid"=>"0_1_0", "subid"=>"1e4efeabf54867e9b85f3c3db9a52cc2"}}>
[daemon-kit]: Processed workitem.
But, that's where it stops. So, I guess I can second John's findings.
Kit
--
Kit Plummer :: MaestroDev :: 520.360.4729
> --
> you received this message because you are subscribed to the "ruote users" group.
> to post : send email to openwfe...@googlegroups.com (mailto:openwfe...@googlegroups.com)
> to unsubscribe : send email to openwferu-use...@googlegroups.com (mailto:openwferu-use...@googlegroups.com)
> more options : http://groups.google.com/group/openwferu-users?hl=en
OK, so I nailed it!
I had to make some changes to daemon-kit which requires a new release
and a version bump to 0.1.9 due to the change in the internals... I'll
wrap that up separately, but here is instructions for how to get the
ping pong to work again:
$ git clone git://github.com/kennethkalmer/daemon-kit.git
$ cd daemon-kit
$ rake build
$ gem install pkg/daemon-kit-0.1.8.2.gem
$ gem install amqp -v 0.7.1
Then setup the ping-pong
$ git clone git://github.com/kennethkalmer/ruote-amqp-ping-pong.git
$ cd ruote-amqp-ping-pong
$ cd ping && bundle install
$ cd ../pong && bundle install
$ cd ../ping-pong-engine && bundle install
Then make sure you have different terminals open and proceed:
(1) $ cd ping && ./bin/ping
(2) $ cd pong && ./bin/pong
(3) $ cd pong-pong-engine && ruby lib/main.rb
As an aside, make sure your rabbitmq is configured correctly. If using
brew, simple as this, if not maybe you need sudo:
$ rabbitmqctl add_user ruote ruote
$ rabbitmqctl add_vhost ruote
$ rabbitmqctl set_permissions -p ruote ruote '.*' '.*' '.*'
Feedback appreciated!
Kind regards
--
Kit Plummer :: MaestroDev :: 520.360.4729
On Saturday, May 28, 2011 at 12:34 PM, Kenneth Kalmer wrote:
> On Fri, May 27, 2011 at 10:20 AM, John Mettraux <jmet...@openwfe.org (mailto:jmet...@openwfe.org)> wrote:
> >
> > On Fri, May 27, 2011 at 08:01:00AM +0200, Kenneth Kalmer wrote:
> > >
> > > I'll have to layer it up and see. I just looked at a current
> > > ruote-amqp 2.2.x project and I'm using amqp 0.7.0 with ruote-amqp, and
> > > amqp 0.6.7 in the remote participant and it works. I'll have a coffee
> > > while I think this through, maybe I can bump ruote-amqp and daemon-kit
> > > to use 0.8.0.
> > >
> > > I'll use the ping-pong example to test this, if it works well we just
> > > need to coordinate the version bump of ruote-amqp with David. I'll
> > > ping the daemon-kit list and the new contributors over there about the
> > > 0.8 rc as well.
> >
> > Hello,
> >
> > yesterday I tried to move ruote-amqp to Amqp 0.7.1 but it was generally broken, 0.7.1 being too close to 0.8.0.
> >
> > Hartog told me Amqp 0.8.x was an excellent thing. They're reorganizing their stuff "the right way".
>
> OK, so I nailed it!
>
> I had to make some changes to daemon-kit which requires a new release
> and a version bump to 0.1.9 due to the change in the internals... I'll
> wrap that up separately, but here is instructions for how to get the
> ping pong to work again:
>
> $ git clone git://github.com/kennethkalmer/daemon-kit.git (http://github.com/kennethkalmer/daemon-kit.git)
> $ cd daemon-kit
> $ rake build
> $ gem install pkg/daemon-kit-0.1.8.2.gem
> $ gem install amqp -v 0.7.1
>
> Then setup the ping-pong
>
> $ git clone git://github.com/kennethkalmer/ruote-amqp-ping-pong.git (http://github.com/kennethkalmer/ruote-amqp-ping-pong.git)
> $ cd ruote-amqp-ping-pong
> $ cd ping && bundle install
I had to update the Gemfile.lock:
$ cd ping && bundle update
> $ cd ../pong && bundle install
$ cd ../pong && bundle update
> $ cd ../ping-pong-engine && bundle install
>
> Then make sure you have different terminals open and proceed:
>
> (1) $ cd ping && ./bin/ping
> (2) $ cd pong && ./bin/pong
> (3) $ cd pong-pong-engine && ruby lib/main.rb
>
> As an aside, make sure your rabbitmq is configured correctly. If using
> brew, simple as this, if not maybe you need sudo:
>
> $ rabbitmqctl add_user ruote ruote
> $ rabbitmqctl add_vhost ruote
> $ rabbitmqctl set_permissions -p ruote ruote '.*' '.*' '.*'
>
> Feedback appreciated!
>
> Kind regards
>
> --
> Kenneth Kalmer
> kenneth...@gmail.com (mailto:kenneth...@gmail.com)
> http://opensourcery.co.za
> @kennethkalmer
Great news !
I've merged your work Kenneth and submitted a pull request to Hartog :
https://github.com/coffeeaddict/ruote-amqp-ping-pong/pull/1
Have a nice sunday,
Hi everyone, just to wrap this up, I tested the daemon-kit side with
0.8.0.rc12 as well and it worked without any issues. So from a
daemon-kit perspective, the 3 lines of AMQP code in the project is
compatible with 0.7.1 and 0.8.0.rc12 so I'll note that in a daemon-kit
release.
Thanks to Kit for mentioning the Gemfile.lock glitch, I typed the
instructions off memory before jumping in bed.
Kind regards
--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
@kennethkalmer
Pulled - I flushed some time in debugging friday but didn't get around
to making the fixes in deamon-kit Kenneth has.
I shall put a note up on my blog that the prerequisites have changed.
/me chdirs to blog and fiddles a bit
Done. Now all we need to do is keep it working ;-)
( Also fixed the short-url on simplic.it to be working again:
http://simplic.it/5a19b5b
)
Grtz,
Hartog.