3 ms·
Potentially in original dev's defense, there was a time when OTC queue libraries, like ActiveMQ, weren't usable. During the rise of J2EE, long before Jespin, w
by specialist 5y ago
Potentially in original dev's defense, there was a time when OTC queue libraries, like ActiveMQ, weren't usable.
During the rise of J2EE, long before Jespin, we were directed to use JMS. Because architecture. All of the products we tried for our trivial use case would ABEND or break FIFO.
We submitted bug reports, repo steps, and patches to ActiveMQ. Closed, WONTFIX.
So I gave up. Nobody has time for all that.
Motivated by postfix, I just wrote inbound messages to disk. File name included timestamp and counter. fsync() for the win. (What more could we do?)
Processing a queue meant moving a file to a different directory. Logging, archiving, and grooming were just cron jobs and shell scripts. Tada!
Like your predecessor's solution, this allowed trivial testing, observation, and admin.
I wouldn't do this again today for anything high volume. But for less than 100s of messages per minute? Probably.