Heh, I think we're bleeding edge in more ways than one... thanks for the
fix!

Are there many others using RuoteAMQP in production apps?
-Mario.

--
I want to change the world but they won't give me the source code.


On Thu, Jun 23, 2011 at 08:04, Kenneth Kalmer <[email protected]>wrote:

> On Wed, Jun 22, 2011 at 12:14 PM, Mario Camou <[email protected]> wrote:
> > Hi everyone,
> >
> > I think I might have found a bug in ruote-amqp.
> >
> > I have my own subclasses of RuoteAMQP::ParticipantProxy / Receiver which
> > translates between our message format and the Ruote workitems, and does
> > correlation of incoming messages with workitems. For this I am overriding
> > RuoteAMQP::ParticipantProxy#encode_workitem and
> > RuoteAMQP::Receiver#decode_workitem.
> >
> > I had a bug where, in some conditions, my encode_workitem method was
> > returning a nil instead of a message payload. The thing is, when that
> > happens, AMQP sometimes stops delivering messages to Ruote. Even though
> I've
> > fixed this, I believe this should never happen.
> >
> > I have created a minimal test case as follows. Here's the participant:
> >    class NilParticipant < RuoteAMQP::ParticipantProxy
> >       def initialize(options)
> >         super(options)
> >       end
> >       def consume(wi)
> >         super(wi)
> >       end
> >       # Prepare for correlation if necessary and return the JSON
> > representation of the message
> >       def encode_workitem(wi)
> >         nil
> >       end
> >     end
>
> Hi Mario
>
> Thanks for the detailed bug report. I'll have to play with enqueueing
> +nil+ in RabbitMQ and seeing what happens and maybe escalate the issue
> to the ruote-amqp team for further investigation.
>
> In the meantime I've updated the internals to raise an ArgumentError
> when the encoded workitem turns out to be nil. See
>
> https://github.com/kennethkalmer/ruote-amqp/commit/45d2955747cfa0cf017a0cbc2a6c39defd1d8a5a
> for the tiny change.
>
> Thanks for reporting, I guess we never thought that someone would do
> this so we never solidified the "api".
>
> Let me know if there is anything else we can help with!
>
> Kind regards
>
> --
> Kenneth Kalmer
> [email protected]
> http://opensourcery.co.za
> @kennethkalmer
>
> --
> 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
>

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