mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-05 10:20:53 +02:00
append to subscribers (#2640)
* append to subscribers * Update rpc_router.go error correction log
This commit is contained in:
parent
674b9822e0
commit
ca6190f5f2
@ -137,6 +137,7 @@ func (s *rpcServer) reSubscribe(config Options) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.subscribers[sb] = []broker.Subscriber{sub}
|
s.subscribers[sb] = []broker.Subscriber{sub}
|
||||||
|
s.router.Subscribe(sb)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -549,6 +549,7 @@ func (router *router) ProcessMessage(ctx context.Context, msg Message) (err erro
|
|||||||
subs, ok := router.subscribers[msg.Topic()]
|
subs, ok := router.subscribers[msg.Topic()]
|
||||||
router.su.RUnlock()
|
router.su.RUnlock()
|
||||||
if !ok {
|
if !ok {
|
||||||
|
log.Warnf("Subscriber not found for topic %s", msg.Topic())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user