Event Broker not working

Nov 9, 2008 at 4:26 PM
Can someone, please demonstrate to me with a simple example how EB is supposed to work? I have implemented everything as explained in the respective documentation but cannot "publish" any events. This should be a two-liner. So what am I doing wrong?

Thanks,
Fru.
Nov 18, 2008 at 12:18 PM

Hi,
I am having a problem with getting the EventBroker for WCSFContrib to work (across module boundries)! 

I am of the opinion that if I publish an event in one module and subscribe to it from another module, then I do not get the intended notifications when my events are published.

I have peeked a bit into the code, and seem to have located the cause of the problem.

It seems that the implementation of the IRequestEventBroker interface (the RequestEventBroker class) is buggy on the methods "AddPublisher()" resp. "AddSubscriber()".

  public void AddPublisher(object instance, MemberReference<EventInfo> data)
  {
   Publisher publisher = DoAddPublisher(instance, data);

   List<DelegateInfo> delegates = new List<DelegateInfo>();

   List<EventBrokingData<MethodInfo>> subscribers;
   if (subscribersByTopic.TryGet(data.Topic, out subscribers))

In the above If-Statement, the "instance variable - subscribesByTopic is being used to locate possible subscribers for a located publisher!

Should this not be some "global variable" - which knows about the possible subscribers in all modules?

The private instance variable limits us IMO to subscribers in the current module - and to me that is the reason why I cannot get EventBroker to work accross module boundries?

Can you confirm this for me and I will be happy if you can hint me on a probable workaround  or "fix" to this problem.

Thanks,
Fru.