[rabbitmq-discuss] How to handle full exchange history delivery
Busoli, Simone
Simone.Busoli at ferrari.com
Wed Jun 1 11:52:24 BST 2011
Hi,
I am trying to achieve a scenario in which messages are published from some data source into a RabbitMQ exchange and clients should be able to receive the full history of messages flown through that exchange, regardless of the exact moment in time when they connect.
I've been thinking to solve it by setting up a proxy which subscribes to the exchange where messages are published using its own queue, keeps an internal storage of the messages and accepts requests from clients.
When a request from a client arrives it just replays the full message history to the client by publishing the messages to the client queue (supplied in the ReplyTo field), then binds the client queue to the messages exchange, so that the client from this moment onwards starts receiving the "live" messages, and is pretty much unaware of what's happened; it simply just receives the whole history.
Now I am under the impression that there's a fundamental flaw in this reasoning, since the proxy cannot know when the message history has completed and he can switch the client to the live stream, because while it is replaying historical messages to the client other live messages might be arriving on the proxy's queue, thus getting into an endless loop.
I'm probably missing something obvious, any advice about how others would approach this scenario is appreciated.
Simone
_________________________________________________________________________________________________________________
Questo messaggio e da intendersi esclusivamente ad uso del destinatario e puo contenere informazioni che sono di natura privilegiata, confidenziale
o non divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non e il destinatario designato, o il dipendente/agente responsabile
per la consegna del messaggio al destinatario designato, si informa che ogni disseminazione, distribuzione o copiatura di questa comunicazione e
strettamente proibita anche ai sensi del decreto legislativo 196/03 . Se avete ricevuto questo messaggio per errore, vi preghiamo di notificarcelo
immediatamente a mezzo e-mail di risposta e successivamente di procedere alla cancellazione di questa e-mail e relativi allegati dal vostro sistema.
_________________________________________________________________________________________________________________
This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from
your system.
_________________________________________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110601/f56fdab6/attachment-0001.htm>
More information about the rabbitmq-discuss
mailing list