dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
MqSource.hpp
1// SPDX-FileCopyrightText: 2026 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Project includes
12#include "SourceTransport.hpp"
13#include <dfx-fdwatch/PollerFd.hpp>
14
15namespace dfx::Core
16{
32{
33public:
38 MqSource(Endpoint endpoint, nlohmann::json config);
39
40public:
42 void start(FdWatch::Poller & poller) override;
43
45 void stop() noexcept override;
46
47private:
48 void _onReadyRead(FdWatch::EventTriggers events);
49
50private:
51 FdWatch::PollerFd _mqfd;
52 std::size_t _messageMaxSize;
53};
54} // !namespace dfx::Core
Definition Endpoint.hpp:24
void start(FdWatch::Poller &poller) override
Opens the MQ and attaches to the poller.
MqSource(Endpoint endpoint, nlohmann::json config)
Initializes the MQ source with endpoint information.
void stop() noexcept override
Closes the MQ and detaches from the poller.
SourceTransport(Endpoint endpoint, nlohmann::json config)
Constructs a SourceTransport with the Role::Source role.
Definition SourceTransport.hpp:31
Endpoint const & endpoint() const noexcept
Gets the endpoint descriptor associated with this transport.
Definition Transport.hpp:161
nlohmann::json const & config() const noexcept
Gets the JSON configuration used to initialize this transport.
Definition Transport.hpp:176
Bitset wrapper for dfx::FdWatch::EventTrigger values.
Abstract interface for FD-based event polling.
Definition Poller.hpp:37
Definition Channel.hpp:25
Definition SocketClient.hpp:23
STL namespace.