20#ifndef ORES_EVENTING_SERVICE_REGISTRAR_HPP
21#define ORES_EVENTING_SERVICE_REGISTRAR_HPP
23#include "ores.utility/log/make_logger.hpp"
24#include "ores.eventing/service/postgres_event_source.hpp"
26namespace ores::eventing::service {
43 [[nodiscard]]
static auto& lg() {
45 static auto instance = make_logger(
"ores.eventing.service.registrar");
58 template<
typename Event>
60 const std::string& entity_name,
61 const std::string& channel_name) {
62 BOOST_LOG_SEV(lg(), utility::log::info)
63 <<
"Registering event mapping: " << entity_name
64 <<
" -> " << channel_name;
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Event source that bridges PostgreSQL LISTEN/NOTIFY to the event bus.
Definition postgres_event_source.hpp:57
void register_mapping(const std::string &entity_name, const std::string &channel_name)
Register a mapping from entity name to typed domain event.
Definition postgres_event_source.hpp:104
Helper class for registering entity-to-event mappings.
Definition registrar.hpp:41
static void register_mapping(postgres_event_source &source, const std::string &entity_name, const std::string &channel_name)
Register a single entity-to-event mapping.
Definition registrar.hpp:59