You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by Michael Goulish <mg...@redhat.com> on 2013/02/26 21:17:35 UTC

messenger - dead letters possible?

Would it be possible, without breaking the messenger 
paradigm very much, to provide some way of knowing 
which messages had not been delivered after a specified 
time?

i.e.

pn_message_set_ttl ( message, seconds );

and then maybe

int n_dead_letters = pn_messenger_expired ( messenger );

for ( i = 0 ; i < n_dead_letters; ++ i )
{
  pn_messenger_get_dead_letter ( messenger );
  /* app does something with dead letter */
}


Re: messenger - dead letters possible?

Posted by Rafael Schloming <rh...@alum.mit.edu>.
Sorry, I missed this one when I was travelling. There is actually already a
way to track the status of messages through the messenger API. Every put
and get is associated with a tracker which you can pass back to the API to
check the status of pending messages.

The semantics of send aren't actually to block until a message is accepted,
but rather to block until the outcome is known, so if the recipient rejects
the message, or there is no such destination, etc, that will be marked as
the status and send will return.

--Rafael

On Wed, Feb 27, 2013 at 12:43 PM, Alan Conway <ac...@redhat.com> wrote:

> On Tue, 2013-02-26 at 15:17 -0500, Michael Goulish wrote:
> > Would it be possible, without breaking the messenger
> > paradigm very much, to provide some way of knowing
> > which messages had not been delivered after a specified
> > time?
> >
> > i.e.
> >
> > pn_message_set_ttl ( message, seconds );
> >
> > and then maybe
> >
> > int n_dead_letters = pn_messenger_expired ( messenger );
> >
> > for ( i = 0 ; i < n_dead_letters; ++ i )
> > {
> >   pn_messenger_get_dead_letter ( messenger );
> >   /* app does something with dead letter */
> > }
> >
>
> Good question: more generally how does/should proton expose the AMQP
> settlement status of messages? That will be important when we start to
> think about HA and fail-over of proton clients, so we can replay the
> right messages.
>
>
>

Re: messenger - dead letters possible?

Posted by Alan Conway <ac...@redhat.com>.
On Tue, 2013-02-26 at 15:17 -0500, Michael Goulish wrote:
> Would it be possible, without breaking the messenger 
> paradigm very much, to provide some way of knowing 
> which messages had not been delivered after a specified 
> time?
> 
> i.e.
> 
> pn_message_set_ttl ( message, seconds );
> 
> and then maybe
> 
> int n_dead_letters = pn_messenger_expired ( messenger );
> 
> for ( i = 0 ; i < n_dead_letters; ++ i )
> {
>   pn_messenger_get_dead_letter ( messenger );
>   /* app does something with dead letter */
> }
> 

Good question: more generally how does/should proton expose the AMQP
settlement status of messages? That will be important when we start to
think about HA and fail-over of proton clients, so we can replay the
right messages.