DistributedApplications: queue workflow over the three-listener fixture with crash/partition histories (P-DISTRIBUTED-05 integration)
This commit is contained in:
1 parent
57ebf3130b
commit
91e7a90213
4 files changed
+492
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "distributed_host/replicated_kv.hpp"
|
||||
#include "distributed_host/replicated_queue.hpp"
|
||||
|
||||
#include <Void/Functional/Result.hpp>
|
||||
#include <Void/Net/HttpServer.hpp>
|
||||
@@ -22,6 +23,10 @@ namespace DistributedHost
|
||||
std::size_t max_connections{8};
|
||||
std::chrono::milliseconds shutdown_grace{
|
||||
std::chrono::seconds{2}};
|
||||
/// Queue policy shared by every node handler.
|
||||
QueueConfig queue{};
|
||||
/// Bounded recorded outbox deliveries.
|
||||
std::size_t max_delivered{1024};
|
||||
};
|
||||
|
||||
/// Three-node replicated KV reference over real loopback HTTP listeners.
|
||||
@@ -41,6 +46,17 @@ namespace DistributedHost
|
||||
/// POST /admin/partition?node=X&partition=N
|
||||
/// POST /admin/crash?node=X
|
||||
/// POST /admin/restart?node=X
|
||||
///
|
||||
/// Replicated worker queue over the same group:
|
||||
/// POST /queue/publish?key=K body = payload
|
||||
/// POST /queue/claim?consumer=C
|
||||
/// POST /queue/ack?consumer=C&id=J
|
||||
/// POST /queue/nack?consumer=C&id=J body = reason
|
||||
/// POST /queue/recover?consumer=C
|
||||
/// POST /queue/dispatch deliver pending outbox effects
|
||||
/// GET /queue/status?id=J
|
||||
/// GET /queue/dlq
|
||||
/// GET /queue/delivered
|
||||
class ClusterFixture
|
||||
{
|
||||
public:
|
||||
@@ -83,5 +99,6 @@ namespace DistributedHost
|
||||
ReplicatedKvCluster m_cluster;
|
||||
mutable std::mutex m_mutex;
|
||||
std::vector<std::unique_ptr<PeerServer>> m_peers;
|
||||
std::vector<std::string> m_delivered;
|
||||
};
|
||||
} // namespace DistributedHost
|
||||
Reference in new issue
Block a user