Skip to content

Register EventReceiveHandler only when service available #89

@LittleHuba

Description

@LittleHuba

What

Currently the registration of a EventReceiveHandler is done within NotSubscribedState::SubscribeEvent() independent of the state in state_machine_.provider_service_instance_is_available_.

I.e. even if provider_service_instance_is_available_ is FALSE the call to state_machine_.event_receive_handler_manager_.Register() is done!

But this Register() will finally lead to a register-message-sending via message-passing. But if the service instance is NOT available, this registration will most likely fail anyhow (provider not there, not listening on message-passing receiver)! This failing will only be detected by an error-log-message! There is no result/return-code in state_machine_.event_receive_handler_manager_.Register()!

So the call to register shall done only in case provider_service_instance_is_available_ == true, which minimizes the risk to do a message-passing send without success anyways.


This change/fix is an optimization/nice-to-have. In case the Register() call is done while service isn't reachable (and therefore the message-passing send is lost), as soon as the service gets available again a re-register will done and this should then succeed.

How

No response

Estimates for realization

  • Effort medium
  • Risk that the scope may extend if this requires adaptations in other places
  • No impact on users expected

Category

  • Affects Detailed Design

Requirements / Architecture

  • Requirements / Architecture are not affected by this change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions