Delphi Event Bus (for short DEB) is an Event Bus framework for Delphi
Switch branches/tags
Nothing to show
Clone or download
spinettaro refactoring clone object with RTTIUtils so no more need of REST.JSON …
…and System.JSON. This add compatibiity with prior version of delphi

removed EventBus.Attributes.pas and moved SubscribeAttribute in EventBus.Commons.pas
removed EventBus.Poster.pas because no more needed
Latest commit d33aa3e Apr 23, 2018

alt text

DEB an Event Bus framework for Delphi

Delphi Event Bus (for short DEB) is a publish/subscribe Event Bus framework for the Delphi platform.

DEB is designed to decouple different parts/layers of your application while still allowing them to communicate efficiently. It was inspired by EventBus framework for the Android platform.

alt text


  • Easy and clean: DelphiEventBus is super easy to learn and use because it respects KISS and "Convention over configuration" design principles. By using default TEventBus instance, you can start immediately to delivery and receive events
  • Designed to decouple different parts/layers of your application
  • Event Driven
  • Attributes based API: Simply put the Subscribe attribute on your subscriber method you are able to receive a specific event
  • Support different delivery mode: Specifying the TThreadMode in Subscribe attribute, you can choose to delivery the event in the Main Thread or in a Background ones, regardless where an event was posted. The EventBus will manage Thread synchronization
  • Unit Tested
  • Thread Safe

Show me the code

1.Define events:

TEvent = class(TObject)
// additional information here

2.Prepare subscribers:

  • Declare your subscribing method:
procedure OnEvent(AEvent: TAnyTypeOfEvent);
  // manage the event 	
  • Register your subscriber:

3.Post events:;


  • DEB is a 100% ObjectPascal framework so it works on VCL and Firemonkey
  • It works with Delphi2010 and major


Copyright 2016 Daniele Spinetti

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.