Hi Ali,

Not sure if this is exactly what you are looking for but maybe trying to solve this I might also learn few things:

Save zmqpubsequence=tcp://127.0.0.1:28332 in bitcoin.conf

Run bitcoind

Run this python script: https://pastebin.com/raw/tNp2x5y3

You will see results like this:
https://i.imgur.com/xKzFJbl.png
https://i.imgur.com/gpsTTHZ.png

A - Accepted, C- Connect (block) and R- Removal in the above screenshots

If you are looking for unconfirmed transactions printed in sequence I think this should help. Since transactions can be printed twice (accept,remove) in this case as well, python script can be modified to manage this IMO.

Other alternatives can be debug=mempool and reading debug.log for changes without polling.

--
Prayank

A3B1 E430 2298 178F