diff options
author | komels <komels@yandex-team.ru> | 2022-04-14 13:10:53 +0300 |
---|---|---|
committer | komels <komels@yandex-team.ru> | 2022-04-14 13:10:53 +0300 |
commit | 21c9b0e6b039e9765eb414c406c2b86e8cea6850 (patch) | |
tree | f40ebc18ff8958dfbd189954ad024043ca983ea5 /kikimr/yndx/persqueue/msgbus_server/read_session_info.h | |
parent | 9a4effa852abe489707139c2b260dccc6f4f9aa9 (diff) | |
download | ydb-21c9b0e6b039e9765eb414c406c2b86e8cea6850.tar.gz |
Final part on compatibility layer: LOGBROKER-7215
ref:777c67aadbf705d19034a09a792b2df61ba53697
Diffstat (limited to 'kikimr/yndx/persqueue/msgbus_server/read_session_info.h')
-rw-r--r-- | kikimr/yndx/persqueue/msgbus_server/read_session_info.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/kikimr/yndx/persqueue/msgbus_server/read_session_info.h b/kikimr/yndx/persqueue/msgbus_server/read_session_info.h new file mode 100644 index 0000000000..f92572677d --- /dev/null +++ b/kikimr/yndx/persqueue/msgbus_server/read_session_info.h @@ -0,0 +1,43 @@ +#pragma once + +#include <ydb/core/client/server/msgbus_server_pq_read_session_info.h> + +#include <kikimr/yndx/grpc_services/persqueue/grpc_pq_actor.h> + + +namespace NKikimr { +namespace NMsgBusProxy { + +class TPersQueueGetReadSessionsInfoWorkerWithPQv0 : public IPersQueueGetReadSessionsInfoWorker { +public: + using TBase = IPersQueueGetReadSessionsInfoWorker; + using TBase::TBase; + using TBase::SendStatusRequest; + + STFUNC(StateFunc) override { + switch (ev->GetTypeRewrite()) { + HFunc(NGRpcProxy::TEvPQProxy::TEvReadSessionStatusResponse, HandleStatusResponse<NGRpcProxy::TEvPQProxy::TEvReadSessionStatusResponse>); + HFunc(NGRpcProxy::V1::TEvPQProxy::TEvReadSessionStatusResponse, HandleStatusResponse<NGRpcProxy::V1::TEvPQProxy::TEvReadSessionStatusResponse>); + HFunc(TEvents::TEvUndelivered, Undelivered); + HFunc(TEvInterconnect::TEvNodeDisconnected, Disconnected); + } + } + +private: + void SendStatusRequest(const TString& sessionName, TActorId actorId, const TActorContext& ctx) override; +}; + +class TPersQueueGetReadSessionsInfoWorkerWithPQv0Factory : public IPersQueueGetReadSessionsInfoWorkerFactory { +public: + THolder<IPersQueueGetReadSessionsInfoWorker> Create( + const TActorId& parentId, + const THashMap<TString, TActorId>& readSessions, + std::shared_ptr<const TPersQueueBaseRequestProcessor::TNodesInfo> nodesInfo + ) const override { + return MakeHolder<TPersQueueGetReadSessionsInfoWorkerWithPQv0>(parentId, readSessions, nodesInfo); + } +}; + +} // namespace NMsgBusProxy +} // namespace NKikimr + |