Repository: Tochemey/goakt
Pull request #380 (2024-06-29 18:33:19)

feat: add timeout to Ask/RemoteAsk and Client Ask

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/Tochemey/goakt/pull/380?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene) Report
Attention: Patch coverage is `97.56098%` with `1 line` in your changes missing coverage. Please review.
> Project coverage is 86.45%. Comparing base [(`efcd10b`)](https://app.codecov.io/gh/Tochemey/goakt/commit/efcd10b991bf9ce79dbbbe192749f5e7bcd1cc2a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene) to head [(`636bdb2`)](https://app.codecov.io/gh/Tochemey/goakt/commit/636bdb22036f240c20b5143ef491070183d64e35?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene).

| [Files](https://app.codecov.io/gh/Tochemey/goakt/pull/380?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene) | Patch % | Lines |
|---|---|---|
| [actors/reflection.go](https://app.codecov.io/gh/Tochemey/goakt/pull/380?src=pr&el=tree&filepath=actors%2Freflection.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene#diff-YWN0b3JzL3JlZmxlY3Rpb24uZ28=) | 83.33% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/Tochemey/goakt/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
+ Coverage   86.42%   86.45%   +0.02%     
==========================================
  Files          44       44              
  Lines        3633     3640       +7     
==========================================
+ Hits         3140     3147       +7     
  Misses        349      349              
  Partials      144      144              
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/Tochemey/goakt/pull/380?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Arsene).


Patch:
diff --git a/actors/actor_system.go b/actors/actor_system.go
index 03962e1..8684e88 100644
--- a/actors/actor_system.go
+++ b/actors/actor_system.go
@@ -126,7 +126,7 @@ type ActorSystem interface {
 	Deregister(ctx context.Context, actor Actor) error
 	// handleRemoteAsk handles a synchronous message to another actor and expect a response.
 	// This block until a response is received or timed out.
-	handleRemoteAsk(ctx context.Context, to PID, message proto.Message) (response proto.Message, err error)
+	handleRemoteAsk(ctx context.Context, to PID, message proto.Message, timeout time.Duration) (response proto.Message, err error)
 	// handleRemoteTell handles an asynchronous message to an actor
 	handleRemoteTell(ctx context.Context, to PID, message proto.Message) error
 }
@@ -153,7 +153,7 @@ type actorSystem struct {
 	expireActorAfter time.Duration
 	// Specifies how long the sender of a receiveContext should wait to receive a reply
 	// when using SendReply. The default value is 5s
-	replyTimeout time.Duration
+	askTimeout time.Duration
 	// Specifies the shutdown timeout. The default value is 30s
 	shutdownTimeout time.Duration
 	// Specifies the maximum of retries to attempt when the actor
@@ -194,7 +194,8 @@ type actorSystem struct {
 	// specifies the stash capacity
 	stashCapacity uint64
 
-	housekeeperStopSig chan types.Unit
+	stopGC     chan types.Unit
+	gcInterval time.Duration
 
 	// specifies the events stream
 	eventsStream *eventstream.EventsStream
@@ -209,7 +210,7 @@ type actorSystem struct {
 	metricEnabled atomic.Bool
 
 	registry   types.Registry
-	reflection reflection
+	reflection *reflection
 
 	peersStateLoopInterval time.Duration
 	peersCacheMu           *sync.RWMutex
@@ -237,14 +238,15 @@ func NewActorSystem(name string, opts ...Option) (ActorSystem, error) {
 		name:                   name,
 		logger:                 log.DefaultLogger,
 		expireActorAfter:       DefaultPassivationTimeout,
-		replyTimeout:           DefaultReplyTimeout,
+		askTimeout:             DefaultAskTimeout,
 		actorInitMaxRetries:    DefaultInitMaxRetries,
 		supervisorStrategy:     DefaultSupervisoryStrategy,
 		telemetry:              telemetry.New(),
 		locker:                 sync.Mutex{},
 		shutdownTimeout:        DefaultShutdownTimeout,
 		mailboxSize:            DefaultMailboxSize,
-		housekeeperStopSig:     make(chan types.Unit, 1),
+		stopGC:                 make(chan types.Unit, 1),
+		gcInterval:             DefaultGCInterval,
 		eventsStream:           eventstream.New(),
 		partitionHasher:        hash.DefaultHasher(),
 		actorInitTimeout:       DefaultInitTimeout,
@@ -432,7 +434,7 @@ func (x *actorSystem) Spawn(ctx context.Context, name string, actor Actor) (PID,
 	opts := []pidOption{
 		withInitMaxRetries(x.actorInitMaxRetries),
 		withPassivationAfter(x.expireActorAfter),
-		withReplyTimeout(x.replyTimeout),
+		withAskTimeout(x.askTimeout),
 		withCustomLogger(x.logger),
 		withActorSystem(x),
 		withSupervisorStrategy(x.supervisorStrategy),
@@ -506,7 +508,7 @@ func (x *actorSystem) SpawnFromFunc(ctx context.Context, receiveFunc ReceiveFunc
 	pidOpts := []pidOption{
 		withInitMaxRetries(x.actorInitMaxRetries),
 		withPassivationAfter(x.expireActorAfter),
-		withReplyTimeout(x.replyTimeout),
+		withAskTimeout(x.askTimeout),
 		withCustomLogger(x.logger),
 		withActorSystem(x),
 		withSupervisorStrategy(x.supervisorStrategy),
@@ -780,7 +782,7 @@ func (x *actorSystem) Start(ctx context.Context) error {
 
 	x.scheduler.Start(spanCtx)
 
-	go x.housekeeper()
+	go x.gc()
 
 	x.logger.Infof("%s started..:)", x.name)
 	return nil
@@ -799,7 +801,7 @@ func (x *actorSystem) Stop(ctx context.Context) error {
 		return e
 	}
 
-	x.housekeeperStopSig <- types.Unit{}
+	x.stopGC <- types.Unit{}
 	x.logger.Infof("%s is shutting down..:)", x.name)
 
 	x.started.Store(false)
@@ -935,7 +937,12 @@ func (x *actorSystem) RemoteAsk(ctx context.Context, stream *connect.BidiStream[
 			return ErrAddressNotFound(actorPath.String())
 		}
 
-		reply, err := x.handleRemoteAsk(ctx, pid, message)
+		timeout := x.askTimeout
+		if request.GetTimeout() != nil {
+			timeout = request.GetTimeout().AsDuration()
+		}
+
+		reply, err := x.handleRemoteAsk(ctx, pid, message, timeout)
 		if err != nil {
 			logger.Error(ErrRemoteSendFailure(err).Error())
 			return ErrRemoteSendFailure(err)
@@ -1150,10 +1157,10 @@ func (x *actorSystem) GetKinds(_ context.Context, request *connect.Request[inter
 
 // handleRemoteAsk handles a synchronous message to another actor and expect a response.
 // This block until a response is received or timed out.
-func (x *actorSystem) handleRemoteAsk(ctx context.Context, to PID, message proto.Message) (response proto.Message, err error) {
+func (x *actorSystem) handleRemoteAsk(ctx context.Context, to PID, message proto.Message, timeout time.Duration) (response proto.Message, err error) {
 	spanCtx, span := x.tracer.Start(ctx, "HandleRemoteAsk")
 	defer span.End()
-	return Ask(spanCtx, to, message, x.replyTimeout)
+	return Ask(spanCtx, to, message, timeout)
 }
 
 // handleRemoteTell handles an asynchronous message to an actor
@@ -1317,11 +1324,11 @@ func (x *actorSystem) reset() {
 	x.cluster = nil
 }
 
-// housekeeper time to time removes dead actors from the system
+// gc time to time removes dead actors from the system
 // that helps free non-utilized resources
-func (x *actorSystem) housekeeper() {
-	x.logger.Info("Housekeeping has started...")
-	ticker := time.NewTicker(30 * time.Millisecond)
+func (x *actorSystem) gc() {
+	x.logger.Info("garbage collector has started...")
+	ticker := time.NewTicker(x.gcInterval)
 	tickerStopSig := make(chan types.Unit, 1)
 	go func() {
 		for {
@@ -1329,7 +1336,7 @@ func (x *actorSystem) housekeeper() {
 			case <-ticker.C:
 				for _, actor := range x.Actors() {
 					if !actor.IsRunning() {
-						x.logger.Infof("Removing actor=%s from system", actor.ActorPath().Name())
+						x.logger.Infof("removing actor=%s from system", actor.ActorPath().Name())
 						x.actors.delete(actor.ActorPath())
 						if x.InCluster() {
 							if err := x.cluster.RemoveActor(context.Background(), actor.ActorPath().Name()); err != nil {
@@ -1339,7 +1346,7 @@ func (x *actorSystem) housekeeper() {
 						}
 					}
 				}
-			case <-x.housekeeperStopSig:
+			case <-x.stopGC:
 				tickerStopSig <- types.Unit{}
 				return
 			}
@@ -1348,7 +1355,7 @@ func (x *actorSystem) housekeeper() {
 
 	<-tickerStopSig
 	ticker.Stop()
-	x.logger.Info("Housekeeping has stopped...")
+	x.logger.Info("garbage collector has stopped...")
 }
 
 // registerMetrics register the PID metrics with OTel instrumentation.
diff --git a/actors/api.go b/actors/api.go
index 31f50ef..13d839b 100644
--- a/actors/api.go
+++ b/actors/api.go
@@ -33,6 +33,7 @@ import (
 	"connectrpc.com/otelconnect"
 	"google.golang.org/protobuf/proto"
 	"google.golang.org/protobuf/types/known/anypb"
+	"google.golang.org/protobuf/types/known/durationpb"
 
 	"github.com/tochemey/goakt/v2/goaktpb"
 	"github.com/tochemey/goakt/v2/internal/http"
@@ -201,7 +202,7 @@ func RemoteTell(ctx context.Context, to *goaktpb.Address, message proto.Message)
 }
 
 // RemoteAsk sends a synchronous message to another actor remotely and expect a response.
-func RemoteAsk(ctx context.Context, to *goaktpb.Address, message proto.Message) (response *anypb.Any, err error) {
+func RemoteAsk(ctx context.Context, to *goaktpb.Address, message proto.Message, timeout time.Duration) (response *anypb.Any, err error) {
 	marshaled, err := anypb.New(message)
 	if err != nil {
 		return nil, ErrInvalidRemoteMessage(err)
@@ -224,6 +225,7 @@ func RemoteAsk(ctx context.Context, to *goaktpb.Address, message proto.Message)
 			Receiver: to,
 			Message:  marshaled,
 		},
+		Timeout: durationpb.New(timeout),
 	}
 	stream := remotingService.RemoteAsk(ctx)
 	errc := make(chan error, 1)
diff --git a/actors/option.go b/actors/option.go
index 6f2b963..72ea2a4 100644
--- a/actors/option.go
+++ b/actors/option.go
@@ -68,7 +68,7 @@ func WithLogger(logger log.Logger) Option {
 // in a receive-reply pattern
 func WithReplyTimeout(timeout time.Duration) Option {
 	return OptionFunc(func(a *actorSystem) {
-		a.replyTimeout = timeout
+		a.askTimeout = timeout
 	})
 }
 
@@ -200,3 +200,10 @@ func WithPeerStateLoopInterval(interval time.Duration) Option {
 		system.peersStateLoopInterval = interval
 	})
 }
+
+// WithGCInterval sets the GC interval
+func WithGCInterval(interval time.Duration) Option {
+	return OptionFunc(func(system *actorSystem) {
+		system.gcInterval = interval
+	})
+}
diff --git a/actors/pid.go b/actors/pid.go
index 90a6a0a..95078f6 100644
--- a/actors/pid.go
+++ b/actors/pid.go
@@ -203,7 +203,7 @@ type pid struct {
 
 	// specifies how long the sender of a mail should wait to receive a reply
 	// when using Ask. The default value is 5s
-	replyTimeout atomic.Duration
+	askTimeout atomic.Duration
 
 	// specifies the maximum of retries to attempt when the actor
 	// initialization fails. The default value is 5
@@ -314,7 +314,7 @@ func newPID(ctx context.Context, actorPath *Path, actor Actor, opts ...pidOption
 	p.stashCapacity.Store(DefaultStashCapacity)
 	p.isRunning.Store(false)
 	p.passivateAfter.Store(DefaultPassivationTimeout)
-	p.replyTimeout.Store(DefaultReplyTimeout)
+	p.askTimeout.Store(DefaultAskTimeout)
 	p.initTimeout.Store(DefaultInitTimeout)
 	p.traceEnabled.Store(false)
 	p.metricEnabled.Store(false)
@@ -556,7 +556,7 @@ func (x *pid) SpawnChild(ctx context.Context, name string, actor Actor) (PID, er
 	opts := []pidOption{
 		withInitMaxRetries(int(x.initMaxRetries.Load())),
 		withPassivationAfter(x.passivateAfter.Load()),
-		withReplyTimeout(x.replyTimeout.Load()),
+		withAskTimeout(x.askTimeout.Load()),
 		withCustomLogger(x.logger),
 		withActorSystem(x.system),
 		withSupervisorStrategy(x.supervisorStrategy),
@@ -655,7 +655,7 @@ func (x *pid) Ask(ctx context.Context, to PID, message proto.Message) (response
 	messageContext := newReceiveContext(spanCtx, x, to, message, false)
 	to.doReceive(messageContext)
 
-	for await := time.After(x.replyTimeout.Load()); ; {
+	for await := time.After(x.askTimeout.Load()); ; {
 		select {
 		case response = <-messageContext.response:
 			x.lastProcessingDuration.Store(time.Since(x.lastProcessingTime.Load()))
@@ -743,7 +743,7 @@ func (x *pid) BatchAsk(ctx context.Context, to PID, messages ...proto.Message) (
 
 		// await patiently to receive the response from the actor
 	timerLoop:
-		for await := time.After(x.replyTimeout.Load()); ; {
+		for await := time.After(x.askTimeout.Load()); ; {
 			select {
 			case resp := <-messageContext.response:
 				x.lastProcessingDuration.Store(time.Since(x.lastProcessingTime.Load()))
@@ -1238,7 +1238,7 @@ func (x *pid) init(ctx context.Context) error {
 func (x *pid) reset() {
 	x.lastProcessingTime.Store(time.Time{})
 	x.passivateAfter.Store(DefaultPassivationTimeout)
-	x.replyTimeout.Store(DefaultReplyTimeout)
+	x.askTimeout.Store(DefaultAskTimeout)
 	x.shutdownTimeout.Store(DefaultShutdownTimeout)
 	x.initMaxRetries.Store(DefaultInitMaxRetries)
 	x.lastProcessingDuration.Store(0)
diff --git a/actors/pid_option.go b/actors/pid_option.go
index 8965317..bbde897 100644
--- a/actors/pid_option.go
+++ b/actors/pid_option.go
@@ -42,11 +42,11 @@ func withPassivationAfter(duration time.Duration) pidOption {
 	}
 }
 
-// withReplyTimeout sets how long in seconds an actor should reply a command
+// withAskTimeout sets how long in seconds an actor should reply a command
 // in a receive-reply pattern
-func withReplyTimeout(timeout time.Duration) pidOption {
+func withAskTimeout(timeout time.Duration) pidOption {
 	return func(pid *pid) {
-		pid.replyTimeout.Store(timeout)
+		pid.askTimeout.Store(timeout)
 	}
 }
 
diff --git a/actors/reflection.go b/actors/reflection.go
index 560a45e..482e235 100644
--- a/actors/reflection.go
+++ b/actors/reflection.go
@@ -31,34 +31,22 @@ import (
 )
 
 // reflection helps create an instance dynamically
-type reflection interface {
-	// ActorFrom creates a new instance of Actor from its FQN
-	ActorFrom(key string) (actor Actor, err error)
-}
-
-// reflectionImpl implements Reflection
-type reflectionImpl struct {
+type reflection struct {
 	registry types.Registry
 }
 
-// enforce compilation error
-var _ reflection = &reflectionImpl{}
-
 // newReflection creates an instance of Reflection
-func newReflection(registry types.Registry) reflection {
-	return &reflectionImpl{registry: registry}
+func newReflection(registry types.Registry) *reflection {
+	return &reflection{registry: registry}
 }
 
 // ActorFrom creates a new instance of Actor from its FQN
-func (r *reflectionImpl) ActorFrom(key string) (actor Actor, err error) {
+func (r *reflection) ActorFrom(key string) (actor Actor, err error) {
 	rtype, ok := r.registry.TypeOf(key)
 	if !ok {
 		return nil, ErrTypeNotRegistered
 	}
-	return r.actorOf(rtype)
-}
 
-func (r *reflectionImpl) actorOf(rtype reflect.Type) (actor Actor, err error) {
 	iActor := reflect.TypeOf((*Actor)(nil)).Elem()
 	isActor := rtype.Implements(iActor) || reflect.PointerTo(rtype).Implements(iActor)
 
@@ -66,9 +54,9 @@ func (r *reflectionImpl) actorOf(rtype reflect.Type) (actor Actor, err error) {
 		return nil, ErrInstanceNotAnActor
 	}
 
-	newInstance := reflect.New(rtype)
-	if !newInstance.IsValid() {
+	instance := reflect.New(rtype)
+	if !instance.IsValid() {
 		return nil, ErrInvalidInstance
 	}
-	return newInstance.Interface().(Actor), nil
+	return instance.Interface().(Actor), nil
 }
diff --git a/actors/types.go b/actors/types.go
index 790c5aa..b787017 100644
--- a/actors/types.go
+++ b/actors/types.go
@@ -43,8 +43,8 @@ const (
 
 	// DefaultPassivationTimeout defines the default passivation timeout
 	DefaultPassivationTimeout = 2 * time.Minute
-	// DefaultReplyTimeout defines the default send/reply timeout
-	DefaultReplyTimeout = 20 * time.Second
+	// DefaultAskTimeout defines the default Ask timeout
+	DefaultAskTimeout = 20 * time.Second
 	// DefaultInitMaxRetries defines the default value for retrying actor initialization
 	DefaultInitMaxRetries = 5
 	// DefaultSupervisoryStrategy defines the default supervisory strategy
@@ -59,7 +59,11 @@ const (
 	DefaultPeerStateLoopInterval = 10 * time.Second
 	// DefaultStashCapacity defines the default stash size
 	DefaultStashCapacity = 1_000
-	eventsTopic          = "topic.events"
+	// DefaultGCInterval defines the default GC interval
+	// This helps cleanup dead actors from the given actor system
+	DefaultGCInterval = 30 * time.Millisecond
+	// eventsTopic defines the events topic
+	eventsTopic = "topic.events"
 )
 
 // NoSender means that there is no sender
diff --git a/client/client.go b/client/client.go
index 01c72ab..3190cec 100644
--- a/client/client.go
+++ b/client/client.go
@@ -186,13 +186,13 @@ func (x *Client) Tell(ctx context.Context, actor *Actor, message proto.Message)
 // Ask sends a message to a given actor provided the actor name and expects a response.
 // If the given actor does not exist it will be created automatically when
 // Client mode is enabled. This will block until a response is received or timed out.
-func (x *Client) Ask(ctx context.Context, actor *Actor, message proto.Message) (reply proto.Message, err error) {
+func (x *Client) Ask(ctx context.Context, actor *Actor, message proto.Message, timeout time.Duration) (reply proto.Message, err error) {
 	// lookup the actor address
 	address, err := x.Whereis(ctx, actor)
 	if err != nil {
 		return nil, err
 	}
-	response, err := actors.RemoteAsk(ctx, address, message)
+	response, err := actors.RemoteAsk(ctx, address, message, timeout)
 	if err != nil {
 		return nil, err
 	}
diff --git a/internal/internalpb/remoting.pb.go b/internal/internalpb/remoting.pb.go
index 0c7dcff..2b351cc 100644
--- a/internal/internalpb/remoting.pb.go
+++ b/internal/internalpb/remoting.pb.go
@@ -11,6 +11,7 @@ import (
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	anypb "google.golang.org/protobuf/types/known/anypb"
+	durationpb "google.golang.org/protobuf/types/known/durationpb"
 	reflect "reflect"
 	sync "sync"
 )
@@ -31,6 +32,8 @@ type RemoteAskRequest struct {
 
 	// Specifies the remote message to send
 	RemoteMessage *RemoteMessage `protobuf:"bytes,1,opt,name=remote_message,json=remoteMessage,proto3" json:"remote_message,omitempty"`
+	// Specifies the timeout(how long to wait for a reply)
+	Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
 }
 
 func (x *RemoteAskRequest) Reset() {
@@ -72,6 +75,13 @@ func (x *RemoteAskRequest) GetRemoteMessage() *RemoteMessage {
 	return nil
 }
 
+func (x *RemoteAskRequest) GetTimeout() *durationpb.Duration {
+	if x != nil {
+		return x.Timeout
+	}
+	return nil
+}
+
 type RemoteAskResponse struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -720,107 +730,113 @@ var file_internal_remoting_proto_rawDesc = []byte{
 	0x6e, 0x61, 0x6c, 0x70, 0x62, 0x1a, 0x11, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x2f, 0x67, 0x6f, 0x61,
 	0x6b, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
 	0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74,
-	0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
-	0x19, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d,
-	0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f,
-	0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x43, 0x0a, 0x11, 0x52, 0x65, 0x6d,
-	0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e,
-	0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
-	0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
-	0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x55,
-	0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e,
-	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54,
-	0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x52,
-	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
-	0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42,
-	0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
-	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x70,
-	0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
-	0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x70, 0x62, 0x2e, 0x41,
-	0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2c,
-	0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
-	0x32, 0x10, 0x2e, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65,
-	0x73, 0x73, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
-	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
-	0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 0x0a, 0x14,
-	0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x71,
+	0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73,
+	0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f,
+	0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x19, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65,
+	0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6d,
+	0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69,
+	0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22,
+	0x43, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x22, 0x55, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65,
+	0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x65, 0x6d,
+	0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65,
+	0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x52,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x22, 0x51, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75,
+	0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
+	0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f,
+	0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07,
+	0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
+	0x67, 0x6f, 0x61, 0x6b, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52,
+	0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d,
+	0x6f, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65,
+	0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x61,
+	0x6b, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65,
+	0x6e, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x70, 0x62,
+	0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76,
+	0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x22, 0x52, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70,
+	0x61, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f,
+	0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12,
+	0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f,
+	0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+	0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+	0x4f, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71,
 	0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74,
 	0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04,
 	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77,
-	0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x11, 0x52, 0x65, 0x6d,
-	0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
-	0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f,
-	0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
-	0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65,
+	0x22, 0x14, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+	0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
+	0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74,
+	0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
+	0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61,
+	0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4e,
+	0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70,
+	0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79,
+	0x70, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77,
+	0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x03, 0x0a, 0x0f, 0x52, 0x65,
+	0x6d, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a,
+	0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x74,
+	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73,
+	0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
+	0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x0a, 0x52,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x74, 0x65,
+	0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c,
+	0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
+	0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c,
+	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65,
+	0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x74,
+	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f,
+	0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e,
+	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c,
+	0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a,
+	0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, 0x20,
+	0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f,
+	0x74, 0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65,
+	0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f,
+	0x70, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65,
 	0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
-	0x22, 0x7a, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f,
-	0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d,
-	0x0a, 0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a,
-	0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x13,
-	0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x32, 0xf4, 0x03, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x69, 0x6e, 0x67,
-	0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74,
-	0x65, 0x41, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70,
-	0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e,
-	0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54,
-	0x65, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62,
-	0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e,
-	0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
-	0x73, 0x65, 0x28, 0x01, 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f,
-	0x6f, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70,
-	0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65,
-	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
-	0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74,
-	0x65, 0x52, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, 0x20, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
-	0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x53, 0x70,
-	0x61, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x74,
-	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65,
-	0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a,
-	0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1d, 0x2e, 0x69, 0x6e,
-	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53,
-	0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x74,
-	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74,
-	0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x52, 0x65,
-	0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65,
-	0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61,
-	0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x74, 0x65,
-	0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61,
-	0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa6, 0x01, 0x0a, 0x0e, 0x63,
-	0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x42, 0x0d, 0x52,
-	0x65, 0x6d, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x48, 0x02, 0x50, 0x01,
-	0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x6f, 0x63,
-	0x68, 0x65, 0x6d, 0x65, 0x79, 0x2f, 0x67, 0x6f, 0x61, 0x6b, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69,
-	0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
-	0x70, 0x62, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0xa2, 0x02, 0x03,
-	0x49, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62,
-	0xca, 0x02, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0xe2, 0x02, 0x16,
-	0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
-	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
-	0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x12, 0x4e, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12,
+	0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d,
+	0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x1f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d,
+	0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x42, 0xa6, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+	0x6c, 0x70, 0x62, 0x42, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f,
+	0x74, 0x6f, 0x48, 0x02, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+	0x6f, 0x6d, 0x2f, 0x74, 0x6f, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x79, 0x2f, 0x67, 0x6f, 0x61, 0x6b,
+	0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e,
+	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+	0x6c, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x49, 0x6e, 0x74, 0x65,
+	0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0xca, 0x02, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+	0x6c, 0x70, 0x62, 0xe2, 0x02, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62,
+	0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x49,
+	0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (
@@ -850,34 +866,36 @@ var file_internal_remoting_proto_goTypes = []interface{}{
 	(*RemoteStopResponse)(nil),    // 10: internalpb.RemoteStopResponse
 	(*RemoteSpawnRequest)(nil),    // 11: internalpb.RemoteSpawnRequest
 	(*RemoteSpawnResponse)(nil),   // 12: internalpb.RemoteSpawnResponse
-	(*anypb.Any)(nil),             // 13: google.protobuf.Any
-	(*goaktpb.Address)(nil),       // 14: goaktpb.Address
+	(*durationpb.Duration)(nil),   // 13: google.protobuf.Duration
+	(*anypb.Any)(nil),             // 14: google.protobuf.Any
+	(*goaktpb.Address)(nil),       // 15: goaktpb.Address
 }
 var file_internal_remoting_proto_depIdxs = []int32{
 	6,  // 0: internalpb.RemoteAskRequest.remote_message:type_name -> internalpb.RemoteMessage
-	13, // 1: internalpb.RemoteAskResponse.message:type_name -> google.protobuf.Any
-	6,  // 2: internalpb.RemoteTellRequest.remote_message:type_name -> internalpb.RemoteMessage
-	14, // 3: internalpb.RemoteLookupResponse.address:type_name -> goaktpb.Address
-	14, // 4: internalpb.RemoteMessage.sender:type_name -> goaktpb.Address
-	14, // 5: internalpb.RemoteMessage.receiver:type_name -> goaktpb.Address
-	13, // 6: internalpb.RemoteMessage.message:type_name -> google.protobuf.Any
-	0,  // 7: internalpb.RemotingService.RemoteAsk:input_type -> internalpb.RemoteAskRequest
-	2,  // 8: internalpb.RemotingService.RemoteTell:input_type -> internalpb.RemoteTellRequest
-	4,  // 9: internalpb.RemotingService.RemoteLookup:input_type -> internalpb.RemoteLookupRequest
-	7,  // 10: internalpb.RemotingService.RemoteReSpawn:input_type -> internalpb.RemoteReSpawnRequest
-	9,  // 11: internalpb.RemotingService.RemoteStop:input_type -> internalpb.RemoteStopRequest
-	11, // 12: internalpb.RemotingService.RemoteSpawn:input_type -> internalpb.RemoteSpawnRequest
-	1,  // 13: internalpb.RemotingService.RemoteAsk:output_type -> internalpb.RemoteAskResponse
-	3,  // 14: internalpb.RemotingService.RemoteTell:output_type -> internalpb.RemoteTellResponse
-	5,  // 15: internalpb.RemotingService.RemoteLookup:output_type -> internalpb.RemoteLookupResponse
-	8,  // 16: internalpb.RemotingService.RemoteReSpawn:output_type -> internalpb.RemoteReSpawnResponse
-	10, // 17: internalpb.RemotingService.RemoteStop:output_type -> internalpb.RemoteStopResponse
-	12, // 18: internalpb.RemotingService.RemoteSpawn:output_type -> internalpb.RemoteSpawnResponse
-	13, // [13:19] is the sub-list for method output_type
-	7,  // [7:13] is the sub-list for method input_type
-	7,  // [7:7] is the sub-list for extension type_name
-	7,  // [7:7] is the sub-list for extension extendee
-	0,  // [0:7] is the sub-list for field type_name
+	13, // 1: internalpb.RemoteAskRequest.timeout:type_name -> google.protobuf.Duration
+	14, // 2: internalpb.RemoteAskResponse.message:type_name -> google.protobuf.Any
+	6,  // 3: internalpb.RemoteTellRequest.remote_message:type_name -> internalpb.RemoteMessage
+	15, // 4: internalpb.RemoteLookupResponse.address:type_name -> goaktpb.Address
+	15, // 5: internalpb.RemoteMessage.sender:type_name -> goaktpb.Address
+	15, // 6: internalpb.RemoteMessage.receiver:type_name -> goaktpb.Address
+	14, // 7: internalpb.RemoteMessage.message:type_name -> google.protobuf.Any
+	0,  // 8: internalpb.RemotingService.RemoteAsk:input_type -> internalpb.RemoteAskRequest
+	2,  // 9: internalpb.RemotingService.RemoteTell:input_type -> internalpb.RemoteTellRequest
+	4,  // 10: internalpb.RemotingService.RemoteLookup:input_type -> internalpb.RemoteLookupRequest
+	7,  // 11: internalpb.RemotingService.RemoteReSpawn:input_type -> internalpb.RemoteReSpawnRequest
+	9,  // 12: internalpb.RemotingService.RemoteStop:input_type -> internalpb.RemoteStopRequest
+	11, // 13: internalpb.RemotingService.RemoteSpawn:input_type -> internalpb.RemoteSpawnRequest
+	1,  // 14: internalpb.RemotingService.RemoteAsk:output_type -> internalpb.RemoteAskResponse
+	3,  // 15: internalpb.RemotingService.RemoteTell:output_type -> internalpb.RemoteTellResponse
+	5,  // 16: internalpb.RemotingService.RemoteLookup:output_type -> internalpb.RemoteLookupResponse
+	8,  // 17: internalpb.RemotingService.RemoteReSpawn:output_type -> internalpb.RemoteReSpawnResponse
+	10, // 18: internalpb.RemotingService.RemoteStop:output_type -> internalpb.RemoteStopResponse
+	12, // 19: internalpb.RemotingService.RemoteSpawn:output_type -> internalpb.RemoteSpawnResponse
+	14, // [14:20] is the sub-list for method output_type
+	8,  // [8:14] is the sub-list for method input_type
+	8,  // [8:8] is the sub-list for extension type_name
+	8,  // [8:8] is the sub-list for extension extendee
+	0,  // [0:8] is the sub-list for field type_name
 }
 
 func init() { file_internal_remoting_proto_init() }
diff --git a/protos/internal/remoting.proto b/protos/internal/remoting.proto
index 83f1036..dc206d1 100644
--- a/protos/internal/remoting.proto
+++ b/protos/internal/remoting.proto
@@ -4,6 +4,7 @@ package internalpb;
 
 import "goakt/goakt.proto";
 import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
 
 option go_package = "github.com/tochemey/goakt/v2/internal/internalpb;internalpb";
 
@@ -12,6 +13,7 @@ option go_package = "github.com/tochemey/goakt/v2/internal/internalpb;internalpb
 // - send messages to actors
 // - lookup actor remotely
 // - spawn actor remotely
+// - re-spawn actor remotely
 // - stop actor remotely
 service RemotingService {
   // RemoteAsk is used to send a message to an actor remotely and expect a response immediately.
@@ -34,6 +36,8 @@ service RemotingService {
 message RemoteAskRequest {
   // Specifies the remote message to send
   RemoteMessage remote_message = 1;
+  // Specifies the timeout(how long to wait for a reply)
+  google.protobuf.Duration timeout = 2;
 }
 
 message RemoteAskResponse {


Test patch:
diff --git a/actors/actor_system_test.go b/actors/actor_system_test.go
index f9bd057..8339bb7 100644
--- a/actors/actor_system_test.go
+++ b/actors/actor_system_test.go
@@ -223,7 +223,7 @@ func TestActorSystem(t *testing.T) {
 		require.NotNil(t, remoteAddr)
 		require.True(t, proto.Equal(remoteAddr, addr))
 
-		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply))
+		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply), DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 
@@ -595,7 +595,7 @@ func TestActorSystem(t *testing.T) {
 			Port: int32(remotingPort),
 			Name: actorName,
 			Id:   "",
-		}, new(testpb.TestReply))
+		}, new(testpb.TestReply), DefaultAskTimeout)
 		require.Error(t, err)
 		require.Nil(t, reply)
 
@@ -1467,7 +1467,7 @@ func TestActorSystem(t *testing.T) {
 		require.NotNil(t, addr)
 
 		// send the message to exchanger actor one using remote messaging
-		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply))
+		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply), DefaultAskTimeout)
 
 		require.NoError(t, err)
 		require.NotNil(t, reply)
diff --git a/actors/api_test.go b/actors/api_test.go
index 93f1664..5b6f419 100644
--- a/actors/api_test.go
+++ b/actors/api_test.go
@@ -1023,7 +1023,7 @@ func TestRemoteAsk(t *testing.T) {
 		// create a message to send to the test actor
 		message := new(testpb.TestReply)
 		// send the message to the actor
-		reply, err := RemoteAsk(ctx, addr, message)
+		reply, err := RemoteAsk(ctx, addr, message, time.Minute)
 		// perform some assertions
 		require.NoError(t, err)
 		require.NotNil(t, reply)
@@ -1079,7 +1079,7 @@ func TestRemoteAsk(t *testing.T) {
 		require.NoError(t, err)
 
 		// send the message to the actor
-		reply, err := RemoteAsk(ctx, addr, nil)
+		reply, err := RemoteAsk(ctx, addr, nil, time.Minute)
 		// perform some assertions
 		require.Error(t, err)
 		require.Nil(t, reply)
@@ -1133,7 +1133,7 @@ func TestRemoteAsk(t *testing.T) {
 		// create a message to send to the test actor
 		message := new(testpb.TestReply)
 		// send the message to the actor
-		reply, err := RemoteAsk(ctx, addr, message)
+		reply, err := RemoteAsk(ctx, addr, message, time.Minute)
 		// perform some assertions
 		require.Error(t, err)
 		require.Nil(t, reply)
@@ -1187,7 +1187,7 @@ func TestRemoteAsk(t *testing.T) {
 		// create a message to send to the test actor
 		message := new(testpb.TestReply)
 		// send the message to the actor
-		reply, err := RemoteAsk(ctx, addr, message)
+		reply, err := RemoteAsk(ctx, addr, message, time.Minute)
 		// perform some assertions
 		require.Error(t, err)
 		require.EqualError(t, err, "failed_precondition: remoting is not enabled")
@@ -1409,7 +1409,7 @@ func TestRemoteAsk(t *testing.T) {
 		// create a message to send to the test actor
 		message := new(testpb.TestReply)
 		// send the message to the actor
-		reply, err := RemoteAsk(ctx, addr, message)
+		reply, err := RemoteAsk(ctx, addr, message, time.Minute)
 		// perform some assertions
 		require.Error(t, err)
 		require.Contains(t, err.Error(), "not found")
@@ -1751,7 +1751,7 @@ func TestAPIRemoteSpawn(t *testing.T) {
 		require.NotNil(t, addr)
 
 		// send the message to exchanger actor one using remote messaging
-		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply))
+		reply, err := RemoteAsk(ctx, addr, new(testpb.TestReply), time.Minute)
 
 		require.NoError(t, err)
 		require.NotNil(t, reply)
diff --git a/actors/context_test.go b/actors/context_test.go
index f92a827..fb5e8ea 100644
--- a/actors/context_test.go
+++ b/actors/context_test.go
@@ -688,7 +688,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -726,7 +726,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -758,7 +758,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -799,7 +799,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -840,7 +840,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -881,7 +881,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -924,7 +924,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -958,7 +958,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -998,7 +998,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -1019,7 +1019,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 
@@ -1042,7 +1042,7 @@ func TestReceiveContext(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -1930,7 +1930,7 @@ func TestReceiveContext(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DefaultLogger),
 		}
@@ -1995,7 +1995,7 @@ func TestReceiveContext(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DiscardLogger),
 		}
diff --git a/actors/option_test.go b/actors/option_test.go
index 681732b..2ccd6b8 100644
--- a/actors/option_test.go
+++ b/actors/option_test.go
@@ -56,7 +56,7 @@ func TestOption(t *testing.T) {
 		{
 			name:     "WithReplyTimeout",
 			option:   WithReplyTimeout(2 * time.Second),
-			expected: actorSystem{replyTimeout: 2. * time.Second},
+			expected: actorSystem{askTimeout: 2. * time.Second},
 		},
 		{
 			name:     "WithActorInitMaxRetries",
@@ -138,6 +138,11 @@ func TestOption(t *testing.T) {
 			option:   WithPeerStateLoopInterval(2 * time.Second),
 			expected: actorSystem{peersStateLoopInterval: 2. * time.Second},
 		},
+		{
+			name:     "WithGCInterval",
+			option:   WithGCInterval(2 * time.Second),
+			expected: actorSystem{gcInterval: 2. * time.Second},
+		},
 	}
 	for _, tc := range testCases {
 		t.Run(tc.name, func(t *testing.T) {
diff --git a/actors/pid_option_test.go b/actors/pid_option_test.go
index 8396e1f..c094621 100644
--- a/actors/pid_option_test.go
+++ b/actors/pid_option_test.go
@@ -62,9 +62,9 @@ func TestPIDOptions(t *testing.T) {
 			expected: &pid{passivateAfter: atomicDuration},
 		},
 		{
-			name:     "WithSendReplyTimeout",
-			option:   withReplyTimeout(time.Second),
-			expected: &pid{replyTimeout: atomicDuration},
+			name:     "WithAskTimeout",
+			option:   withAskTimeout(time.Second),
+			expected: &pid{askTimeout: atomicDuration},
 		},
 		{
 			name:     "WithInitMaxRetries",
diff --git a/actors/pid_test.go b/actors/pid_test.go
index 7e43ead..b416cf7 100644
--- a/actors/pid_test.go
+++ b/actors/pid_test.go
@@ -67,7 +67,7 @@ func TestReceive(t *testing.T) {
 		newTestActor(),
 		withInitMaxRetries(1),
 		withCustomLogger(log.DefaultLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
@@ -97,7 +97,7 @@ func TestPassivation(t *testing.T) {
 		opts := []pidOption{
 			withInitMaxRetries(1),
 			withPassivationAfter(passivateAfter),
-			withReplyTimeout(replyTimeout),
+			withAskTimeout(replyTimeout),
 		}
 
 		// create the actor path
@@ -126,7 +126,7 @@ func TestPassivation(t *testing.T) {
 		opts := []pidOption{
 			withInitMaxRetries(1),
 			withPassivationAfter(passivateAfter),
-			withReplyTimeout(replyTimeout),
+			withAskTimeout(replyTimeout),
 		}
 
 		// create the actor path
@@ -238,7 +238,7 @@ func TestRestart(t *testing.T) {
 			withInitMaxRetries(1),
 			withPassivationAfter(10*time.Second),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, pid)
@@ -282,7 +282,7 @@ func TestRestart(t *testing.T) {
 		pid, err := newPID(ctx, actorPath, actor,
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, pid)
@@ -321,7 +321,7 @@ func TestRestart(t *testing.T) {
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
 			withPassivationAfter(time.Minute),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, pid)
@@ -361,7 +361,7 @@ func TestRestart(t *testing.T) {
 			withInitMaxRetries(1),
 			withPassivationAfter(passivateAfter),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, pid)
@@ -390,7 +390,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -425,7 +425,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
 			withPassivationDisabled(),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -466,7 +466,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			withCustomLogger(log.DiscardLogger),
 			withPassivationDisabled(),
 			withSupervisorStrategy(-1), // this is a rogue strategy which will default to a Stop
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -507,7 +507,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			withCustomLogger(log.DiscardLogger),
 			withSupervisorStrategy(DefaultSupervisoryStrategy),
 			withPassivationDisabled(),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -549,7 +549,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			withCustomLogger(logger),
 			withPassivationDisabled(),
 			withSupervisorStrategy(RestartDirective),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -587,7 +587,7 @@ func TestSupervisorStrategy(t *testing.T) {
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
 			withPassivationDisabled(),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -743,7 +743,7 @@ func TestMessaging(t *testing.T) {
 		opts := []pidOption{
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout),
+			withAskTimeout(replyTimeout),
 		}
 
 		// create the actor path
@@ -861,7 +861,7 @@ func TestActorHandle(t *testing.T) {
 		&exchanger{},
 		withInitMaxRetries(1),
 		withCustomLogger(log.DefaultLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
@@ -886,7 +886,7 @@ func TestPIDActorSystem(t *testing.T) {
 		&exchanger{},
 		withInitMaxRetries(1),
 		withCustomLogger(log.DefaultLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
 	sys := pid.ActorSystem()
@@ -907,7 +907,7 @@ func TestSpawnChild(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -946,7 +946,7 @@ func TestSpawnChild(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -982,7 +982,7 @@ func TestSpawnChild(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -1009,7 +1009,7 @@ func TestSpawnChild(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -1038,7 +1038,7 @@ func TestPoisonPill(t *testing.T) {
 		newTestActor(),
 		withInitMaxRetries(1),
 		withCustomLogger(log.DefaultLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
@@ -1174,7 +1174,7 @@ func TestFailedPostStop(t *testing.T) {
 		&testPostStop{},
 		withInitMaxRetries(1),
 		withCustomLogger(log.DefaultLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
@@ -1193,7 +1193,7 @@ func TestShutdown(t *testing.T) {
 			newSupervisor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, parent)
@@ -1344,7 +1344,7 @@ func TestBatchAsk(t *testing.T) {
 		opts := []pidOption{
 			withInitMaxRetries(1),
 			withCustomLogger(log.DiscardLogger),
-			withReplyTimeout(replyTimeout),
+			withAskTimeout(replyTimeout),
 		}
 
 		// create the actor path
@@ -1384,7 +1384,7 @@ func TestRegisterMetrics(t *testing.T) {
 		withCustomLogger(log.DefaultLogger),
 		withTelemetry(tel),
 		withMetric(),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
@@ -1641,7 +1641,7 @@ func TestID(t *testing.T) {
 		&exchanger{},
 		withInitMaxRetries(1),
 		withCustomLogger(log.DiscardLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
 	sys := pid.ActorSystem()
@@ -1851,7 +1851,7 @@ func TestName(t *testing.T) {
 		&exchanger{},
 		withInitMaxRetries(1),
 		withCustomLogger(log.DiscardLogger),
-		withReplyTimeout(replyTimeout))
+		withAskTimeout(replyTimeout))
 	require.NoError(t, err)
 	assert.NotNil(t, pid)
 	sys := pid.ActorSystem()
@@ -1873,7 +1873,7 @@ func TestPipeTo(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DefaultLogger),
 		}
@@ -1929,7 +1929,7 @@ func TestPipeTo(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DiscardLogger),
 		}
@@ -1966,7 +1966,7 @@ func TestPipeTo(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DiscardLogger),
 		}
@@ -2023,7 +2023,7 @@ func TestPipeTo(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DiscardLogger),
 		}
@@ -2060,7 +2060,7 @@ func TestPipeTo(t *testing.T) {
 
 		opts := []pidOption{
 			withInitMaxRetries(1),
-			withReplyTimeout(askTimeout),
+			withAskTimeout(askTimeout),
 			withPassivationDisabled(),
 			withCustomLogger(log.DiscardLogger),
 		}
diff --git a/actors/scheduler_test.go b/actors/scheduler_test.go
index b3eb413..b089fd0 100644
--- a/actors/scheduler_test.go
+++ b/actors/scheduler_test.go
@@ -96,7 +96,7 @@ func TestScheduler(t *testing.T) {
 			newTestActor(),
 			withInitMaxRetries(1),
 			withCustomLogger(log.DefaultLogger),
-			withReplyTimeout(replyTimeout))
+			withAskTimeout(replyTimeout))
 
 		require.NoError(t, err)
 		assert.NotNil(t, pid)
diff --git a/client/client_test.go b/client/client_test.go
index e01c1dd..df029d8 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -102,7 +102,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -178,7 +178,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -255,7 +255,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -330,7 +330,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -406,7 +406,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -481,7 +481,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}
@@ -561,7 +561,7 @@ func TestClient(t *testing.T) {
 		time.Sleep(time.Second)
 
 		// send a message
-		reply, err := client.Ask(ctx, actor, new(testspb.TestReply))
+		reply, err := client.Ask(ctx, actor, new(testspb.TestReply), actors.DefaultAskTimeout)
 		require.NoError(t, err)
 		require.NotNil(t, reply)
 		expectedReply := &testpb.Reply{Content: "received message"}