etl icon indicating copy to clipboard operation
etl copied to clipboard

Use router id as priority mechanism also in `message_broker`

Open chenlijun99 opened this issue 1 year ago • 2 comments

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.

chenlijun99 avatar Jun 05 '23 16:06 chenlijun99

If it was the default then it would change the operation of legacy code. Priority by I'd could be a possible functional addition.

jwellbelove avatar Jun 05 '23 20:06 jwellbelove

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>.

chenlijun99 avatar Jun 05 '23 20:06 chenlijun99