def subscribe(subscriber = nil, to:, &proc)
      raise ArgumentError, "subscriber must be first argument or block, cannot be both" if subscriber && proc
      subscriber ||= proc
      broker.add_subscription(subscriber, to)
    end
def subscribe(subscriber = nil, to:, &proc)
      raise ArgumentError, "subscriber must be first argument or block, cannot be both" if subscriber && proc
      subscriber ||= proc
      broker.add_subscription(subscriber, to)
    end
Subscribes a handler (subscriber) that will be invoked for published events of provided type.

 @overload subscribe(subscriber, to:)
   @param to [Array<Class>] types of events to subscribe
   @param subscriber [Object, Class] handler
   @return [Proc] - unsubscribe proc. Call to unsubscribe.
   @raise [ArgumentError, SubscriberNotExist]
 @overload subscribe(to:, &subscriber)
   @param to [Array<Class>] types of events to subscribe
   @param subscriber [Proc] handler
   @return [Proc] - unsubscribe proc. Call to unsubscribe.
   @raise [ArgumentError, SubscriberNotExist]