[bitcoin/bitcoin] ZMQ: add options to configure outbound message high water mark, aka SNDHWM (#14060)

domob1812 commented on this pull request.

It might also make sense to return the configured HWM in `getzmqnotifications`.

> @@ -443,11 +443,19 @@ void SetupServerArgs()
gArgs.AddArg(«-zmqpubhashtx=

«, «Enable publish hash transaction in

«, false, OptionsCategory::ZMQ);
gArgs.AddArg(«-zmqpubrawblock=

«, «Enable publish raw block in

«, false, OptionsCategory::ZMQ);
gArgs.AddArg(«-zmqpubrawtx=

«, «Enable publish raw transaction in

«, false, OptionsCategory::ZMQ);
+ gArgs.AddArg(«-zmqpubhashblockhwm=«, strprintf(«Set publish hash block outbound message high water mark (default: %d)», DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
+ gArgs.AddArg(«-zmqpubhashtxhwm=«, strprintf(«Set publish hash transaction outbound message high water mark (default: %d)», DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
+ gArgs.AddArg(«-zmqpubrawblockhwm=«, strprintf(«Set publish raw block outbound message high water mark (default: %d)», DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);
+ gArgs.AddArg(«-zmqpubrawtxhwm=«, strprintf(«Set publish raw transaction outbound message high water mark (default: %d)», DEFAULT_ZMQ_SNDHWM), false, OptionsCategory::ZMQ);

I don’t really like the duplication here (one argument for each publisher cross (address, hwm)), but I think it is probably the easiest solution. At least I don’t see a good alternative that would not be over-engineered if we want the HWM configurable for each publisher separately.