etl
etl copied to clipboard
Use router id as priority mechanism also in `message_broker`
As the title says, reading the message_broker
code it appears to me that a new subscription is directly appended to the linked list of subscriptions. It would be nice if during the insertion in the linked list the router id of the subscription is also taken into account.
If it was the default then it would change the operation of legacy code. Priority by I'd could be a possible functional addition.
Maybe we could make class message_broker
become template <bool SortById = false> class message_broker
and then use if constexpr
in initialise_insertion_point
?
Then have an alias like using prioritized_message_broker = message_broker<true>
.