I've thought about this problem a bit, and came to my personal
conclusion that just requeueing may not fully solve the problem, and
is probably just too low-level for a framework like Nanite. What I'd
say should happen instead is the message should be put back on the
request queue, where it's going to be picked up by a mapper again,
signaled by either the user (e.g. by calling a method) or
automatically when an exception is raised (like in your example).
For full reliability in terms of message delivery and processing, some
extra care has to be taken. I'm just not fully sure yet how that's
going to look. Some sort of delayed ack'ing may be part of it though.
Cheers, Mathias
--
http://paperplanes.de
http://twitter.com/roidrage
> I think I would like to have the option. You could have the current
> behaviour as the default, but with the capability within the agent to
> specify explicit ack/nack-ing:
>
> class ExplicitAckingAgent
> expose :email_client, :explicit_ack => true
>
> def email_client
> ...
> end
> end
>
> What do you think? Would you agree to an api along those lines?
>
That looks decent. I'm gonna give it some more thought over the next
couple of days to get a general idea of where this stuff should go and
how it should work and be exposed to the user.