qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Message history and replay
Date Mon, 22 Jan 2007 14:21:12 GMT
On Thu, 2007-01-18 at 15:52 +0000, Colin Crist wrote:
> Hi,
> 
> A quick question...
> 
> A common recovery scenario is requesting replay on a queue from a given,
> known message, either by its ID or by something in the header. Its saves all
> that mucking about with XA and makes recovery the normal way of system
> startup rather then some exceptional case.
> 
> This means when a message has reached all its recipients it should never be
> marked for removal from the durable message store. 
> 
> As a user, I would also like to control when messages get removed as part of
> my end of day or even weekly processs, probably based on header property
> selectors. 
> 
> I don't believe this is supported in AMQP in the wire protocol (nor perhaps
> should it be) - is it maybe something that could be done via some
> standardised command messages to a "replay" exchange?
> 
> Any thoughts on implementation difficulty? 

You could represent this in AMQP protocol using a custom exchange type.

A ReplayExchange stores all messages sent to it (until cleaned up by
some administrative function.)

When binding a queue to a replay exchange you MAY specify an argument
"replay-from=N". A queue so bound will be "pre-filled" with the range of
message starting from the Nth message up to the most recent message sent
to the exchange. Thereafter the exchange behaves like a fan-out
exchange, each new message being added to all the bound queues.

That gives you replay entirely within the standard protocol, using a
standard extension point to add this as proprietary broker
functionality.

Note that to combine replay with other exchange types requires exchange
chaining which has been discussed several times but is not yet an agreed
part of the protocol - this may be another use case for that discussion

Cheers,
Alan.


Mime
View raw message