You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(data_source_protocol)!: consolidate the push API on a single push_message slot
Rename the runtime-host vtable tail slot push_message_v2 -> push_message and
remove the now-redundant eager push_raw_message slot, leaving one definitive
push entry point. The C++ SDK wrapper pushMessage is unchanged, so plugin
sources that go through it are unaffected; only code that wires the vtable slot
by name needs the new name. Dropping a slot reduces the vtable, so this is an
ABI-breaking change and the layout sentinel asserts are updated accordingly.
Contents:
- data_source_protocol.h: rename push_message_v2 -> push_message; drop the push_raw_message slot
- sdk/data_source_host_views.hpp: align the guard/call/strings with push_message; drop the raw-message path
- sdk/data_source_patterns.hpp: update the slot reference
- pj_base/CMakeLists.txt + rename push_message_v2_test.cpp -> push_message_test.cpp
- abi_layout_sentinels_test.cpp: update the tail-slot asserts for the reduced vtable
- docs (USER_GUIDE, ARCHITECTURE, data-source-guide, message-parser-guide), mock_data_source, and the affected library/file-source tests
@@ -415,7 +417,7 @@ changes, only a different config value.
415
417
callback for flushing accumulated data. The host calls it periodically from
416
418
its own thread. For sources with asynchronous I/O (sockets, hardware), the
417
419
plugin must manage its own receive thread and use `onPoll()` as the sync
418
-
point where buffered data is handed off. Host methods (`pushRawMessage`,
420
+
point where buffered data is handed off. Host methods (`pushMessage`,
419
421
`appendRecord`, etc.) must only be called from `onPoll()` / the host's
420
422
thread, never from the background thread.
421
423
@@ -425,7 +427,7 @@ Key traits of `StreamSourceBase`:
425
427
-`onStart()` opens connections and creates topics or parser bindings.
426
428
-`onPoll()` flushes buffered data into the host — drain what your plugin
427
429
has accumulated and return immediately. Must not block. Host methods
428
-
(`pushRawMessage`, `appendRecord`, etc.) may only be called from this
430
+
(`pushMessage`, `appendRecord`, etc.) may only be called from this
429
431
callback.
430
432
-`onStop()` tears down connections. Must be idempotent.
431
433
-`stop()`, `start()`, `poll()`, and `currentState()` are managed by the
@@ -465,7 +467,7 @@ Access via `runtimeHost()`. Use this for lifecycle coordination and diagnostics.
465
467
|`requestStop(terminal_state, reason)`| Ask the host to stop you (self-terminate). |
466
468
|`isStopRequested()`| Check if the host wants you to stop. |
467
469
|`ensureParserBinding(request)`| Bind a parser for delegated ingest (see below). |
468
-
|`pushRawMessage(handle, timestamp, payload)`| Push raw bytes through a parser binding. |
470
+
|`pushMessage(handle, timestamp, fetch_message_data)`| Push a message through a parser binding via a deferred fetcher callable; the host invokes it per the active ObjectIngestPolicy (eager/lazy). |
469
471
470
472
## Optional Features
471
473
@@ -543,8 +545,9 @@ auto binding = runtimeHost().ensureParserBinding({
543
545
});
544
546
if (!binding) { return PJ::unexpected(binding.error()); }
545
547
546
-
// 2. Push raw payloads — the host parses and stores them
547
-
auto status = runtimeHost().pushRawMessage(*binding, timestamp_ns, payload);
548
+
// 2. Push payloads — the host invokes the fetcher and parses/stores per policy
0 commit comments