Add broker comments on server subscribe
This commit is contained in:
parent
cafd280718
commit
fc08a9146c
@ -653,6 +653,7 @@ func (g *grpcServer) Register() error {
|
|||||||
opts = append(opts, broker.DisableAutoAck())
|
opts = append(opts, broker.DisableAutoAck())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Logf("Broker [%s] Subscribing to topic: %s", config.Broker.String(), sb.Topic())
|
||||||
sub, err := config.Broker.Subscribe(sb.Topic(), handler, opts...)
|
sub, err := config.Broker.Subscribe(sb.Topic(), handler, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -654,12 +654,12 @@ func (s *rpcServer) Register() error {
|
|||||||
opts = append(opts, broker.DisableAutoAck())
|
opts = append(opts, broker.DisableAutoAck())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Logf("Broker [%s] Subscribing to topic: %s", config.Broker.String(), sub.Topic())
|
||||||
sub, err := config.Broker.Subscribe(sb.Topic(), s.HandleEvent, opts...)
|
sub, err := config.Broker.Subscribe(sb.Topic(), s.HandleEvent, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Logf("Subscribing %s to topic: %s", node.Id, sub.Topic())
|
|
||||||
s.subscribers[sb] = []broker.Subscriber{sub}
|
s.subscribers[sb] = []broker.Subscriber{sub}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user