You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
caseSubscribe(subscriber) =>if (!localSubscribers.contains(subscriber)) {
context.watchWith(subscriber, SubscriberTerminated(subscriber))
localSubscribers = localSubscribers + subscriber
if (localSubscribers.size ==1) {
context.log.debug(
"Local subscriber [{}] added, went from no subscribers to one, subscribing to receptionist",
subscriber)
// we went from no subscribers to one, register to the receptionist
receptionist !Receptionist.Register(topicServiceKey, context.self)
} else {
context.log.debug("Local subscriber [{}] added", subscriber)
}
} else {
context.log.debug("Local subscriber [{}] already subscribed, ignoring Subscribe command")
}
this
objectRegister {
/** * Create a Register without Ack that the service was registered*/defapply[T](key: ServiceKey[T], service: ActorRef[T]):Command=newReceptionistMessages.Register[T](key, service, None)
/** * Create a Register with an actor that will get an ack that the service was registered*/defapply[T](key: ServiceKey[T], service: ActorRef[T], replyTo: ActorRef[Registered]):Command=newReceptionistMessages.Register[T](key, service, Some(replyTo))
}
The text was updated successfully, but these errors were encountered:
jxnu-liguobin
changed the title
pubsub not confirmed for Subscribe
pubsub not support confirmed for SubscribeDec 27, 2023
I think that might give a false sense of security/delivery guarantees, because even if held off until the topic has registered and seen a reply from the receptionist, the receptionist on other nodes will not yet have seen that subscriber.
Can you describe a use case where you think the local subscription completing for some meaning of the word would be useful?
I think that might give a false sense of security/delivery guarantees, because even if held off until the topic has registered and seen a reply from the receptionist, the receptionist on other nodes will not yet have seen that subscriber.
Can you describe a use case where you think the local subscription completing for some meaning of the word would be useful?
https://github.com/jxnu-liguobin/akka/blob/b0384c646e2024a47056966553ca7d0137a911d1/akka-actor-typed/src/main/scala/akka/actor/typed/internal/pubsub/TopicImpl.scala#L119
In Subscribe,
replyTo
is not provided for confirming successful registration, butRegister
support itThe text was updated successfully, but these errors were encountered: