On Fri, May 07, 2010 at 05:35:43AM -0700, threetee wrote:
> 
> #<RuntimeError: unknown expression 'kitty'>
> 
> Full trace is below. Any thoughts on why this is happening? Maybe I'm
> not registering my AMQP participants properly?

Hello ThreeTee,

thanks for sharing your explorations ! Much appreciated.

The issue is related to ruote 2.1 and its potentially decoupled workers.

You are starting a separated worker, but are registering "stateful" 
participants.

Looking at :

  
http://github.com/threetee/ruote-rails-example/blob/master/config/initializers/ruote_kit.rb

---8<---
  config.register do

    #
    # "stateless" participants, usable by any worker

    participant :requestor, Ruote::StorageParticipant
    participant :reviewer, Ruote::StorageParticipant
    participant :approver, Ruote::StorageParticipant

    #
    # "stateful" (instantiated) participants, only accessible to the worker
    # inside the engine where they are registered...
    
    amqp = RuoteAMQP::Participant.new(:default_queue => 'work1')
    amqp.map_participant('ashley', 'ingress_work1')
    amqp.map_participant('kitty', 'ingress_work1')
    amqp.map_participant('copper', 'mailbox_work1')

    participant :ashley, amqp
    participant :kitty, amqp
    participant :copper, amqp
    
    catchall
  end
end
--->8---

Since you're not starting a worker inside of the engine where you register your 
"stateful" participants, they are not reachable.

It's vital for ruote-amqp 2.1 to support "stateless" (instantiate each time) 
operations.

Beanstalkd example :

  
http://github.com/jmettraux/ruote-beanstalk/blob/ruote2.1/lib/ruote/beanstalk/participant.rb

Ruote-amqp is still in the ruote 0.9.x mindset where there was a unique worker.

If Kenneth has no time to upgrade the ruote-amqp participant, I can help.


Best regards,

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

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to