NetworkedApplications: durable-job reference composition over Messaging with Scheduler-driven maintenance (P-NETWORKED-07)
This commit is contained in:
1 parent
21b1c8422d
commit
aad91c7d01
4 files changed
+553
-2
No files matched your search
@@ -7,15 +7,16 @@ set(CMAKE_CXX_STANDARD 26)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
find_package(Void CONFIG REQUIRED COMPONENTS Runtime)
|
||||
find_package(Void CONFIG REQUIRED COMPONENTS Runtime Net Sqlite Messaging Scheduler)
|
||||
|
||||
add_library(networked_kv STATIC
|
||||
src/application.cpp
|
||||
src/http_api.cpp
|
||||
src/job_service.cpp
|
||||
src/memory_store.cpp
|
||||
src/sqlite_store.cpp)
|
||||
target_include_directories(networked_kv PUBLIC include)
|
||||
target_link_libraries(networked_kv PUBLIC Void::Net Void::Runtime Void::Sqlite)
|
||||
target_link_libraries(networked_kv PUBLIC Void::Net Void::Runtime Void::Sqlite Void::Messaging Void::Scheduler)
|
||||
|
||||
add_executable(networked_kv_test tests/application_test.cpp)
|
||||
target_link_libraries(networked_kv_test PRIVATE networked_kv)
|
||||
@@ -32,9 +33,13 @@ target_link_libraries(networked_kv_sqlite_test PRIVATE networked_kv)
|
||||
add_executable(networked_kv_protocol_test tests/protocol_matrix_test.cpp)
|
||||
target_link_libraries(networked_kv_protocol_test PRIVATE networked_kv)
|
||||
|
||||
add_executable(networked_kv_job_test tests/job_service_test.cpp)
|
||||
target_link_libraries(networked_kv_job_test PRIVATE networked_kv)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME networked_kv_lifecycle COMMAND networked_kv_test)
|
||||
add_test(NAME networked_kv_domain COMMAND networked_kv_domain_test)
|
||||
add_test(NAME networked_kv_http COMMAND networked_kv_http_test)
|
||||
add_test(NAME networked_kv_sqlite COMMAND networked_kv_sqlite_test)
|
||||
add_test(NAME networked_kv_protocol COMMAND networked_kv_protocol_test)
|
||||
add_test(NAME networked_kv_jobs COMMAND networked_kv_job_test)
|
||||
@@ -0,0 +1,123 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Functional/Result.hpp>
|
||||
#include <Void/Messaging/Queue.hpp>
|
||||
#include <Void/Scheduler/Scheduler.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace NetworkedKv
|
||||
{
|
||||
struct JobServiceConfig {
|
||||
std::string queue_name{"jobs"};
|
||||
std::string group_name{"workers"};
|
||||
std::chrono::milliseconds visibility_timeout{
|
||||
std::chrono::seconds{30}};
|
||||
/// Attempts before the queue dead-letters the job.
|
||||
std::uint32_t max_attempts{3};
|
||||
std::chrono::milliseconds retry_delay{
|
||||
std::chrono::milliseconds{50}};
|
||||
/// Bounded status records; the oldest is evicted beyond this.
|
||||
std::size_t max_tracked_jobs{1024};
|
||||
/// Memory is explicit for the in-memory profile; a durable queue
|
||||
/// profile passes Durable.
|
||||
Void::Messaging::PublishDurability publish_durability{
|
||||
Void::Messaging::PublishDurability::Memory};
|
||||
};
|
||||
|
||||
enum class JobState : std::uint8_t {
|
||||
Submitted,
|
||||
Running,
|
||||
Succeeded,
|
||||
RetryScheduled,
|
||||
DeadLettered,
|
||||
Unknown
|
||||
};
|
||||
|
||||
[[nodiscard]] std::string_view job_state_name(JobState state) noexcept;
|
||||
|
||||
struct JobView {
|
||||
std::string id;
|
||||
JobState state{JobState::Unknown};
|
||||
std::uint32_t attempts{0};
|
||||
std::string last_error;
|
||||
};
|
||||
|
||||
/// Runs one delivered job. `attempt` starts at 1.
|
||||
using JobHandler = std::function<Void::Result::Result<void>(
|
||||
std::string_view payload, std::uint32_t attempt)>;
|
||||
|
||||
/// Durable-job reference composition over the Messaging queue contract.
|
||||
///
|
||||
/// Delivery semantics are the queue's (at-least-once with visibility
|
||||
/// timeout and DLQ after exhausted attempts); this service adds bounded
|
||||
/// job status tracking and a Scheduler-driven maintenance job. Workers
|
||||
/// must be idempotent per job id: a redelivery after a lost ack is
|
||||
/// possible by contract.
|
||||
class JobService
|
||||
{
|
||||
public:
|
||||
|
||||
JobService(Void::Messaging::Queue& queue, JobServiceConfig config = {});
|
||||
JobService(const JobService&) = delete;
|
||||
JobService& operator=(const JobService&) = delete;
|
||||
|
||||
/// Create the queue and consumer group. Idempotent for an
|
||||
/// existing compatible configuration.
|
||||
[[nodiscard]] Void::Result::Result<void> initialize();
|
||||
|
||||
/// Publish one job and return its stable id. The id is the
|
||||
/// queue's idempotency key, so a repeated publish of the same id
|
||||
/// is deduplicated by the queue.
|
||||
[[nodiscard]] Void::Result::Result<std::string> submit(std::string payload);
|
||||
|
||||
/// Receive at most one job, run the handler and ack or nack it.
|
||||
/// Returns the affected job view, or empty when no job is ready.
|
||||
/// A handler failure is recorded (retry or dead letter), not
|
||||
/// returned as an error; queue failures are.
|
||||
[[nodiscard]] Void::Result::Result<std::optional<JobView>>
|
||||
process_one(const JobHandler& handler);
|
||||
|
||||
[[nodiscard]] Void::Result::Result<JobView>
|
||||
status(std::string_view id) const;
|
||||
|
||||
/// Reap expired in-flight deliveries back to pending (or the DLQ
|
||||
/// when attempts are exhausted). Driven by the Scheduler job.
|
||||
[[nodiscard]] Void::Result::Result<std::size_t> maintain();
|
||||
|
||||
[[nodiscard]] Void::Result::Result<
|
||||
std::vector<Void::Messaging::DeadLetterEntry>>
|
||||
dead_letters(std::size_t limit = 100) const;
|
||||
|
||||
/// Register a fixed-rate Scheduler job that runs `maintain()`.
|
||||
/// The scheduler is pure and thread-free: the caller drives it with
|
||||
/// tick()/dispatch_one(). Returns the scheduler job id.
|
||||
[[nodiscard]] Void::Result::Result<std::uint64_t>
|
||||
schedule_maintenance(Void::Scheduler::Scheduler& scheduler,
|
||||
std::chrono::milliseconds period =
|
||||
std::chrono::seconds{30});
|
||||
|
||||
private:
|
||||
|
||||
void track(const JobView& view);
|
||||
|
||||
Void::Messaging::Queue& m_queue;
|
||||
JobServiceConfig m_config;
|
||||
std::uint64_t m_next_id{1};
|
||||
bool m_initialized{false};
|
||||
bool m_maintenance_registered{false};
|
||||
|
||||
mutable std::mutex m_mutex;
|
||||
std::map<std::string, JobView, std::less<>> m_jobs;
|
||||
std::deque<std::string> m_order;
|
||||
};
|
||||
} // namespace NetworkedKv
|
||||
@@ -0,0 +1,232 @@
|
||||
#include "networked_kv/job_service.hpp"
|
||||
|
||||
#include <Void/Time/Clock.hpp>
|
||||
|
||||
#include <exception>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace NetworkedKv
|
||||
{
|
||||
namespace
|
||||
{
|
||||
[[nodiscard]] Void::Result::Error conflict(std::string message)
|
||||
{
|
||||
return Void::Result::Error{Void::Result::ErrorKind::conflict,
|
||||
std::move(message)};
|
||||
}
|
||||
|
||||
[[nodiscard]] Void::Result::Error not_found(std::string message)
|
||||
{
|
||||
return Void::Result::Error{Void::Result::ErrorKind::not_found,
|
||||
std::move(message)};
|
||||
}
|
||||
|
||||
[[nodiscard]] std::vector<std::byte> to_bytes(std::string_view text)
|
||||
{
|
||||
const auto raw = std::as_bytes(std::span{text.data(), text.size()});
|
||||
return std::vector<std::byte>{raw.begin(), raw.end()};
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string to_string(std::span<const std::byte> bytes)
|
||||
{
|
||||
return std::string{
|
||||
reinterpret_cast<const char*>(bytes.data()), bytes.size()};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
std::string_view job_state_name(JobState state) noexcept
|
||||
{
|
||||
switch (state) {
|
||||
case JobState::Submitted: return "submitted";
|
||||
case JobState::Running: return "running";
|
||||
case JobState::Succeeded: return "succeeded";
|
||||
case JobState::RetryScheduled: return "retry-scheduled";
|
||||
case JobState::DeadLettered: return "dead-lettered";
|
||||
case JobState::Unknown: return "unknown";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
JobService::JobService(Void::Messaging::Queue& queue,
|
||||
JobServiceConfig config)
|
||||
: m_queue(queue), m_config(std::move(config))
|
||||
{
|
||||
}
|
||||
|
||||
Void::Result::Result<void> JobService::initialize()
|
||||
{
|
||||
if (m_initialized) {
|
||||
return {};
|
||||
}
|
||||
Void::Messaging::QueueConfig queue;
|
||||
queue.name = m_config.queue_name;
|
||||
queue.retry = Void::Messaging::RetryPolicy{
|
||||
.max_attempts = m_config.max_attempts,
|
||||
.base_delay = m_config.retry_delay,
|
||||
.max_delay = m_config.retry_delay};
|
||||
if (auto created = m_queue.create_queue(std::move(queue)); !created) {
|
||||
return created;
|
||||
}
|
||||
Void::Messaging::GroupConfig group;
|
||||
group.name = m_config.group_name;
|
||||
group.visibility_timeout = m_config.visibility_timeout;
|
||||
if (auto created =
|
||||
m_queue.create_group(m_config.queue_name, std::move(group));
|
||||
!created) {
|
||||
return created;
|
||||
}
|
||||
m_initialized = true;
|
||||
return {};
|
||||
}
|
||||
|
||||
Void::Result::Result<std::string> JobService::submit(std::string payload)
|
||||
{
|
||||
if (!m_initialized) {
|
||||
return std::unexpected{
|
||||
conflict("JobService: initialize() before submitting")};
|
||||
}
|
||||
Void::Messaging::Message message;
|
||||
message.id = "job-" + std::to_string(m_next_id++);
|
||||
message.payload = to_bytes(payload);
|
||||
auto published = m_queue.publish(
|
||||
m_config.queue_name, std::move(message),
|
||||
m_config.publish_durability);
|
||||
if (!published) {
|
||||
return std::unexpected{std::move(published).error()};
|
||||
}
|
||||
track(JobView{.id = published->message_id,
|
||||
.state = JobState::Submitted});
|
||||
return published->message_id;
|
||||
}
|
||||
|
||||
Void::Result::Result<std::optional<JobView>>
|
||||
JobService::process_one(const JobHandler& handler)
|
||||
{
|
||||
auto received =
|
||||
m_queue.try_receive(m_config.queue_name, m_config.group_name);
|
||||
if (!received) {
|
||||
return std::unexpected{std::move(received).error()};
|
||||
}
|
||||
if (!received->has_value()) {
|
||||
return std::optional<JobView>{};
|
||||
}
|
||||
Void::Messaging::Delivery delivery = std::move(**received);
|
||||
const std::string id = delivery.message.id;
|
||||
|
||||
JobView view;
|
||||
view.id = id;
|
||||
view.attempts = delivery.attempt;
|
||||
view.state = JobState::Running;
|
||||
track(view);
|
||||
|
||||
Void::Result::Result<void> handled;
|
||||
try {
|
||||
handled = handler
|
||||
? handler(to_string(delivery.message.payload),
|
||||
delivery.attempt)
|
||||
: Void::Result::Result<void>{};
|
||||
} catch (const std::exception& error) {
|
||||
handled = std::unexpected{Void::Result::Error{
|
||||
Void::Result::ErrorKind::internal,
|
||||
std::string{"job handler threw: "} + error.what()}};
|
||||
} catch (...) {
|
||||
handled = std::unexpected{Void::Result::Error{
|
||||
Void::Result::ErrorKind::internal,
|
||||
"job handler threw an unknown exception"}};
|
||||
}
|
||||
|
||||
if (handled.has_value()) {
|
||||
if (auto acknowledged = m_queue.ack(delivery.receipt);
|
||||
!acknowledged) {
|
||||
return std::unexpected{std::move(acknowledged).error()};
|
||||
}
|
||||
view.state = JobState::Succeeded;
|
||||
track(view);
|
||||
return std::optional<JobView>{view};
|
||||
}
|
||||
|
||||
view.last_error = handled.error().message();
|
||||
// Exhausted attempts are moved to the DLQ by the queue; record the
|
||||
// terminal state now so status does not depend on another receive.
|
||||
view.state = delivery.attempt >= m_config.max_attempts
|
||||
? JobState::DeadLettered
|
||||
: JobState::RetryScheduled;
|
||||
if (auto rejected = m_queue.nack(delivery.receipt,
|
||||
m_config.retry_delay);
|
||||
!rejected) {
|
||||
return std::unexpected{std::move(rejected).error()};
|
||||
}
|
||||
track(view);
|
||||
return std::optional<JobView>{view};
|
||||
}
|
||||
|
||||
Void::Result::Result<JobView>
|
||||
JobService::status(std::string_view id) const
|
||||
{
|
||||
std::lock_guard lock{m_mutex};
|
||||
const auto found = m_jobs.find(id);
|
||||
if (found == m_jobs.end()) {
|
||||
return std::unexpected{not_found(
|
||||
"JobService: no tracked job for the given id")};
|
||||
}
|
||||
return found->second;
|
||||
}
|
||||
|
||||
Void::Result::Result<std::size_t> JobService::maintain()
|
||||
{
|
||||
return m_queue.reap_expired_visibility();
|
||||
}
|
||||
|
||||
Void::Result::Result<std::vector<Void::Messaging::DeadLetterEntry>>
|
||||
JobService::dead_letters(std::size_t limit) const
|
||||
{
|
||||
return m_queue.list_dead_letters(m_config.queue_name,
|
||||
m_config.group_name, limit);
|
||||
}
|
||||
|
||||
Void::Result::Result<std::uint64_t> JobService::schedule_maintenance(
|
||||
Void::Scheduler::Scheduler& scheduler, std::chrono::milliseconds period)
|
||||
{
|
||||
if (!m_maintenance_registered) {
|
||||
auto registered = scheduler.register_handler(
|
||||
"job-maintenance",
|
||||
[this](const Void::Scheduler::OccurrenceContext&,
|
||||
std::span<const std::byte>,
|
||||
Void::Async::OperationOptions) -> Void::Result::Result<void> {
|
||||
auto reaped = maintain();
|
||||
if (!reaped) {
|
||||
return std::unexpected{std::move(reaped).error()};
|
||||
}
|
||||
return {};
|
||||
});
|
||||
if (!registered) {
|
||||
return std::unexpected{std::move(registered).error()};
|
||||
}
|
||||
m_maintenance_registered = true;
|
||||
}
|
||||
Void::Scheduler::JobSpec spec;
|
||||
spec.id = "job-maintenance";
|
||||
spec.handler_id = "job-maintenance";
|
||||
spec.schedule = Void::Scheduler::Schedule::fixed_rate(
|
||||
period, Void::Time::SystemMonotonicClock::instance().now());
|
||||
return scheduler.add_job(std::move(spec));
|
||||
}
|
||||
|
||||
void JobService::track(const JobView& view)
|
||||
{
|
||||
std::lock_guard lock{m_mutex};
|
||||
const auto found = m_jobs.find(view.id);
|
||||
if (found == m_jobs.end()) {
|
||||
if (m_jobs.size() >= m_config.max_tracked_jobs &&
|
||||
!m_order.empty()) {
|
||||
m_jobs.erase(m_order.front());
|
||||
m_order.pop_front();
|
||||
}
|
||||
m_order.push_back(view.id);
|
||||
}
|
||||
m_jobs.insert_or_assign(view.id, view);
|
||||
}
|
||||
|
||||
} // namespace NetworkedKv
|
||||
@@ -0,0 +1,191 @@
|
||||
#include "networked_kv/job_service.hpp"
|
||||
|
||||
#include <Void/Messaging/Queue.hpp>
|
||||
#include <Void/Scheduler/Scheduler.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace NetworkedKv;
|
||||
|
||||
JobServiceConfig config()
|
||||
{
|
||||
JobServiceConfig cfg;
|
||||
cfg.max_attempts = 2;
|
||||
cfg.retry_delay = std::chrono::milliseconds{0};
|
||||
cfg.visibility_timeout = std::chrono::milliseconds{500};
|
||||
return cfg;
|
||||
}
|
||||
|
||||
void submit_requires_initialization()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobService service{queue};
|
||||
assert(!service.submit("payload").has_value());
|
||||
}
|
||||
|
||||
void successful_job_is_acked_and_tracked()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobService service{queue, config()};
|
||||
assert(service.initialize().has_value());
|
||||
|
||||
auto id = service.submit("payload");
|
||||
assert(id.has_value());
|
||||
assert(service.status(*id)->state == JobState::Submitted);
|
||||
|
||||
int calls = 0;
|
||||
auto processed = service.process_one(
|
||||
[&](std::string_view payload, std::uint32_t attempt) {
|
||||
++calls;
|
||||
assert(payload == "payload");
|
||||
assert(attempt == 1);
|
||||
return Void::Result::Result<void>{};
|
||||
});
|
||||
assert(processed.has_value() && processed->has_value());
|
||||
assert((*processed)->state == JobState::Succeeded);
|
||||
assert(calls == 1);
|
||||
|
||||
const auto status = service.status(*id);
|
||||
assert(status.has_value());
|
||||
assert(status->state == JobState::Succeeded);
|
||||
assert(status->attempts == 1);
|
||||
|
||||
// Acked: no redelivery and an empty receive.
|
||||
auto none = service.process_one([](std::string_view,
|
||||
std::uint32_t) {
|
||||
return Void::Result::Result<void>{};
|
||||
});
|
||||
assert(none.has_value() && !none->has_value());
|
||||
|
||||
// Unknown ids are an explicit not-found error.
|
||||
auto missing = service.status("never-submitted");
|
||||
assert(!missing.has_value());
|
||||
assert(missing.error().kind() == Void::Result::ErrorKind::not_found);
|
||||
}
|
||||
|
||||
void failing_job_retries_then_dead_letters()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobServiceConfig cfg = config();
|
||||
cfg.max_attempts = 2;
|
||||
JobService service{queue, cfg};
|
||||
assert(service.initialize().has_value());
|
||||
auto id = service.submit("poison");
|
||||
assert(id.has_value());
|
||||
|
||||
const auto failing = [](std::string_view, std::uint32_t) {
|
||||
return Void::Result::Result<void>{std::unexpected{
|
||||
Void::Result::Error{Void::Result::ErrorKind::internal,
|
||||
"handler exploded"}}};
|
||||
};
|
||||
|
||||
auto first = service.process_one(failing);
|
||||
assert(first.has_value() && first->has_value());
|
||||
assert((*first)->attempts == 1);
|
||||
assert((*first)->state == JobState::RetryScheduled);
|
||||
assert((*first)->last_error == "handler exploded");
|
||||
|
||||
// Retry is immediately available (zero delay) and exhausts attempts.
|
||||
auto second = service.process_one(failing);
|
||||
assert(second.has_value() && second->has_value());
|
||||
assert((*second)->attempts == 2);
|
||||
assert((*second)->state == JobState::DeadLettered);
|
||||
|
||||
auto dead = service.dead_letters();
|
||||
assert(dead.has_value());
|
||||
assert(dead->size() == 1);
|
||||
assert((*dead)[0].message.id == *id);
|
||||
assert((*dead)[0].attempts == 2);
|
||||
}
|
||||
|
||||
void throwing_handler_is_a_recorded_failure()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobService service{queue, config()};
|
||||
assert(service.initialize().has_value());
|
||||
assert(service.submit("boom").has_value());
|
||||
|
||||
auto processed = service.process_one(
|
||||
[](std::string_view, std::uint32_t) -> Void::Result::Result<void> {
|
||||
throw std::runtime_error{"unexpected"};
|
||||
});
|
||||
assert(processed.has_value() && processed->has_value());
|
||||
assert((*processed)->state == JobState::RetryScheduled);
|
||||
assert((*processed)->last_error.find("unexpected") !=
|
||||
std::string::npos);
|
||||
}
|
||||
|
||||
void scheduler_driven_maintenance_reclaims_expired_deliveries()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobServiceConfig cfg = config();
|
||||
cfg.visibility_timeout = std::chrono::milliseconds{50};
|
||||
JobService service{queue, cfg};
|
||||
assert(service.initialize().has_value());
|
||||
assert(service.submit("payload").has_value());
|
||||
|
||||
// Take the delivery in flight and let its visibility expire.
|
||||
auto in_flight =
|
||||
queue.try_receive(cfg.queue_name, cfg.group_name);
|
||||
assert(in_flight.has_value() && in_flight->has_value());
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{80});
|
||||
|
||||
auto scheduler = Void::Scheduler::Scheduler::create();
|
||||
assert(scheduler.has_value());
|
||||
auto job = service.schedule_maintenance(*scheduler,
|
||||
std::chrono::seconds{1});
|
||||
assert(job.has_value());
|
||||
|
||||
// The scheduler is pure: the caller drives it. A tick materializes due
|
||||
// occurrences and dispatch_one executes at most one ready occurrence;
|
||||
// its handler reaps the expired delivery.
|
||||
assert(scheduler->tick().has_value());
|
||||
(void)scheduler->dispatch_one();
|
||||
|
||||
auto processed = service.process_one([](std::string_view,
|
||||
std::uint32_t attempt) {
|
||||
assert(attempt == 2);
|
||||
return Void::Result::Result<void>{};
|
||||
});
|
||||
assert(processed.has_value() && processed->has_value());
|
||||
assert((*processed)->state == JobState::Succeeded);
|
||||
assert((*processed)->attempts == 2);
|
||||
|
||||
assert(scheduler->close_and_join().has_value());
|
||||
}
|
||||
|
||||
void tracked_status_is_bounded()
|
||||
{
|
||||
Void::Messaging::InMemoryQueue queue;
|
||||
JobServiceConfig cfg = config();
|
||||
cfg.max_tracked_jobs = 2;
|
||||
JobService service{queue, cfg};
|
||||
assert(service.initialize().has_value());
|
||||
const auto first = service.submit("a");
|
||||
const auto second = service.submit("b");
|
||||
const auto third = service.submit("c");
|
||||
assert(first.has_value() && second.has_value() && third.has_value());
|
||||
// Oldest record evicted; recent ones retained.
|
||||
assert(!service.status(*first).has_value());
|
||||
assert(service.status(*second).has_value());
|
||||
assert(service.status(*third).has_value());
|
||||
}
|
||||
} // namespace
|
||||
|
||||
int main()
|
||||
{
|
||||
submit_requires_initialization();
|
||||
successful_job_is_acked_and_tracked();
|
||||
failing_job_retries_then_dead_letters();
|
||||
throwing_handler_is_a_recorded_failure();
|
||||
scheduler_driven_maintenance_reclaims_expired_deliveries();
|
||||
tracked_status_is_bounded();
|
||||
std::puts("networked-kv job service ok");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user