1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00

append to subscribers (#2640)

* append to subscribers

* Update rpc_router.go

error correction log
This commit is contained in:
Elmut 2023-11-26 12:08:28 +02:00 committed by GitHub
parent 674b9822e0
commit ca6190f5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,7 @@ func (s *rpcServer) reSubscribe(config Options) error {
}
s.subscribers[sb] = []broker.Subscriber{sub}
s.router.Subscribe(sb)
}
return nil

View File

@ -549,6 +549,7 @@ func (router *router) ProcessMessage(ctx context.Context, msg Message) (err erro
subs, ok := router.subscribers[msg.Topic()]
router.su.RUnlock()
if !ok {
log.Warnf("Subscriber not found for topic %s", msg.Topic())
return nil
}