In order to support both the eventlogging-service-eventbus, as well as multiple eventgate services, the EventBus mediawiki extension needs modified to support multiple endpoints. eventbus service and eventgate have the same HTTP API (although the format of the events they accept is slightly different), so the EventBus extension can be used as is, with either, as long as it is pointed at the correct endpoint.
I plan on modifying the existing single endpoint configs EventServiceUrl and EventServiceTimeout, to a single EventServices hash config.
Example:
$wgEventServices = [ 'eventbus' => [ 'url' => 'http://eventbus.discovery.wmnet:8085/v1/events', 'timeout' => 30, ], 'eventgate-analytics' => [ 'url' => 'http://eventgate-analytics.discovery.wmnet:30192/v1/events', ], 'eventgate-main' => [ 'url' => 'http://eventgate-main.discovery.wmnet:30192/v1/events', ] ];
This will deprecated the global EventServiceUrl config, in favor of the hash. EventBus::getInstance will remain backwards compatible with EventServiceUrl. The new behavior will expect that pass in the name of the event service endpoint you want when you ask for an EventBus instance, e.g.
$eventbusService = EventBus::getInstance('eventbus'); // or $eventgateAnalyticsService = EventBus::getInstance('eventgate-main'); // etc.
This way individual hooks can choose which service endpointm to send an event to.