[Info-vax] Large mailboxes

Arne Vajhøj arne at vajhoej.dk
Tue Dec 1 15:17:04 EST 2020


On 12/1/2020 3:02 PM, Michael Moroney wrote:
> The discussion of mailboxes and MQ kind of reminded me of an old problem:
> 
> Consider an application which produces a fairly large number of small (100-200
> byte) messages. The messages are sent via TCP to another system, and this can't
> be changed. (which is why something like MQ wasn't used)
> 
> We don't want to lose any messages.
> In order to do that, the code was changed to write the messages to an indexed
> file (1 key, the timestamp).  A second process reads records ftom the file,
> sends to the remote system and upon acknowledgement, deletes the record.
> (if no record, it sleeps and tries again)  If the link/remote system was down,
> messages would accumulate in the indexed files.  Once the link was back, the
> second process would empty it.

But maybe an MQ could be used!

writer---MQ with persistence---reader---socket---destination

The MQ would ensure the FIFO characteristics with little effort.

Arne




More information about the Info-vax mailing list