Project

General

Profile

Task #3822

Avatar?id=6098&size=22x22

Task #3801: Improve EventBus implementation

Return error if there is listener being added to event which is not thrown

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Very low
Target version:
Start date:
2016-01-11
Due date:
2016-06-30
% Done:

100%

Estimated time:
Database:
n/a

Description

Right now it is possible to register in event bus to listen for event which may not be fired as ie. it is not implemented in this version - support added in future version but someone may try register. In this case now it will not know that there is no such event.

I think we should add check so that in this case error should be returned to user that there is no such event.

I do not think this is important at this point but before release of version 7.2.0, I think it may be good idea to add this feature.

Associated revisions

Revision bb09f30e (diff)
Added by Bartosz Małkowski TigaseTeam about 3 years ago

#3822: Return error if there is listener being added to event which is not thrown

Revision 4143102c (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

Task #3822 - added info to log when handler for not registered event is added

History

#1 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam over 3 years ago

  • Due date set to 2016-06-30
  • Assignee changed from Artur Hefczyc to Andrzej Wójcik
  • Target version set to tigase-server-8.0.0

Good idea. Who is the best person to work on this, you or Bartosz? Please reassign.

#2 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

  • Assignee changed from Andrzej Wójcik to Bartosz Małkowski

#3 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam about 3 years ago

  • Status changed from New to In QA
  • Assignee changed from Bartosz Małkowski to Andrzej Wójcik

As we discussed, it is hard to check it during registration listener, because it is possible that something want to listener for some events but event emiter may not be installed at all.

So I added event registration and EventBus may (configurable) throw exception in case of fire unknown event.

#4 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

  • Status changed from In QA to Feedback
  • Assignee changed from Andrzej Wójcik to Bartosz Małkowski

I think this is all we need, however I would suggest to add entry to log wtih FINEST level if there is no event for particular name, even if check is disabled.

It may help during analysis of possible issues, ie. when event name would change.

#5 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

I added this log entry just to close this task as higher priority task was waiting for this and this is long overdue.

Also available in: Atom PDF