Questions tagged [event-bus]

Questions pertaining to Event Bus systems (e.g. GWT, otto, etc.).

Event Bus Systems have Event driven/distributed asynchronous architecture patterns. The advantages of these systems are that can be used with small to complex applications, enable creating highly scalable reactive applications and services can be independent, isolated and decoupled from each other. publish/subscribe system is possible by using an implementation of an event bus.

446 questions
58
votes
4 answers

What is the difference between EventBus and RxJava?

I am confused about the difference between EventBus and RxJava in android. I need to implement one of them for my issue about notifying some components when some changes have been done, so that they can update their state. Also, I read that…
HiddenDroid
  • 1,440
  • 4
  • 14
  • 27
47
votes
4 answers

Is using event library like Otto or EventBus a recommended way to handle relations between Activities, Fragments, and background threads

In most of the case, when dealing with case User thread (AsyncTask) to perform background processing Pass back calculated result back to Activity or Fragment Activity or Fragment re-creation might happen before user thread finishes its background…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
46
votes
15 answers

EventBus - Subscriber class and its super classes have no public methods with the @subscribe annotation

I'm creating an Android application using EventBus for posting asynchronous broadcasts to other classes, but I'm running into an error during execution. MainActivity.java import android.content.Intent; import…
Rahul Kulhalli
  • 555
  • 1
  • 5
  • 12
39
votes
4 answers

EventBus/PubSub vs (reactive extensions) RX with respect to code clarity in a single threaded application

Currently, I am using an EventBus/PubSub architecture/pattern with Scala (and JavaFX) to implement a simple note organizing app (sort of like an Evernote client with some added mind mapping functionality) and I have to say that I really like…
31
votes
1 answer

When to use an Event Bus?

I'm designing the backend for a new Java web app and am trying to decide whether or not to use an Event Bus; specifically the Guava EventBus. Most server-side requests will be synchronous: that is, the user is requesting data and needs a response…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
30
votes
7 answers

jQuery plugin for Event Driven Architecture?

Are there any Event Driven Architecture jQuery plugins? Step 1: Subscribing The subscribers subscribe to the event handler in the middle, and pass in a callback method, as well as the name of the event they are listening for... i.e. The two green…
28
votes
4 answers

EventBus vs Callbacks, which to use when?

I have many Activities which raise background tasks; the Activities will pass themselves in as having implemented a listener callback, so that the background tasks can raise an event on the Activities. The Activities in turn can show something on…
Mendhak
  • 8,194
  • 5
  • 47
  • 64
26
votes
3 answers

In RabbitMQ which is more expensive, multiple queues per exchange, or multiple exchanges and less queues per each?

So we decided to go with RabbitMQ as a message/event bus in our migration to micro-services architecture, but we couldn't find a definite answer on what is the best way of putting our queues, we have two options to go with: One main exchange which…
bingorabbit
  • 665
  • 5
  • 11
24
votes
3 answers

Why interfaces for message contracts are strongly recommended in MassTransit?

MassTransit states that we should use interfaces for message contracts : It is strongly suggested to use interfaces for message contracts, based on experience over several years with varying levels of developer experience. MassTransit will…
Edgars Pivovarenoks
  • 1,526
  • 1
  • 17
  • 31
23
votes
5 answers

EventBus : Activity does not receive event when app is in the background

I'm using EventBus to communicate between Activity and Service. Today I got a problem and don't know why. I have Activity, Fragment and Service. All of them are working fine. In Activity and Fragment I registered them to Receive events which…
ThaiPD
  • 3,503
  • 3
  • 30
  • 48
17
votes
5 answers

Is Eventbus a Mediator or Observer Pattern?

Is Eventbus more a Mediator or an Observer? According to Google, "eventbus mediator" gets 2.430 hits and "eventbus observer" gets 3.850 hits. From the description, they would both match what I was trying to do (the mediator even a little more). So…
Stefan
  • 14,826
  • 17
  • 80
  • 143
17
votes
4 answers

Differences between Greenrobot EventBus and Guava's EventBus

I´ve been using quite often EventBus from greenrobot https://github.com/greenrobot/EventBus But I´ve just realised that Guava has its own EventBus com.google.common.eventbus.EventBus Does someone know if there are big differences?
Jose M Lechon
  • 5,766
  • 6
  • 44
  • 60
17
votes
1 answer

Android Pros & Cons: Event Bus and RxJava

I have been using Event Bus in my apps (i.e: greenrobot/EventBus). But I find some disadvantages in using Event Bus: Chaining tasks execution is difficult A lot of classes to represent events Less clear code (well, it's still possible to trace, but…
Pablo Espantoso
  • 416
  • 6
  • 13
17
votes
2 answers

Akka Event Bus Tutorial

Are there any good tutorials/explanations on how to use the the event bus in akka? I've read through the Akka doc but I find it difficult to understand how to use the event bus
Tsume
  • 907
  • 2
  • 11
  • 21
16
votes
1 answer

EventBus, register and registerSticky method

I use greenrobot EventBus library to send data between two fragments in my android app and I want to know what is the diffeence between register(Object b) method and registerSticky(Object object) method?
karoluch
  • 653
  • 3
  • 9
  • 21
1
2 3
29 30