msgstore: starting replay stuff with first simple version of replay-id

This commit is contained in:
Helmut Merz 2025-09-23 09:44:59 +02:00
parent b3c03fcde5
commit a3d0619bc2

View file

@ -2,11 +2,15 @@
(defpackage :scopes/storage/msgstore (defpackage :scopes/storage/msgstore
(:use :common-lisp) (:use :common-lisp)
(:local-nicknames (:message :scopes/core/message) (:local-nicknames (:actor :scopes/core/actor)
(:core :scopes/core)
(:message :scopes/core/message)
(:shape :scopes/shape) (:shape :scopes/shape)
(:storage :scopes/storage) (:storage :scopes/storage)
(:tracking :scopes/storage/tracking)) (:tracking :scopes/storage/tracking))
(:export #:make-container #:save)) (:export #:make-container #:save
#:replay-id
))
(in-package :scopes/storage/msgstore) (in-package :scopes/storage/msgstore)
@ -30,3 +34,9 @@
:head (shape:head msg) :data (shape:data msg) :head (shape:head msg) :data (shape:data msg)
:container cont))) :container cont)))
(tracking:save pm))) (tracking:save pm)))
(defun replay-id (ctx msgid rcvr)
(let* ((st (storage:storage ctx))
(cont (make-container st))
(msg (tracking:get-track cont msgid)))
(actor:send (core:find-service rcvr) msg)))