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
8
votes
4 answers

Using RxJava and EventBus to send an event back to the activity/fragment

Android Studio 3.2 Canary 8 com.squareup:otto:1.3.8 io.reactivex:rxjava:1.3.7 kotlin 1.2.31 I am trying to send an event back to my Activity using the otto EventBus. However, I am using RxJava to perform some background work and need the event to…
ant2009
  • 27,094
  • 154
  • 411
  • 609
8
votes
1 answer

GreenRobot's eventbus can't see annotation, "no public methods"

So, I found out about Green Robots' eventbus module. Followed the instructions on this page to try to get it working: http://greenrobot.org/eventbus/documentation/how-to-get-started/ Seems simple enough. I put in the appropriate code, but when…
Ken Corey
  • 435
  • 3
  • 15
8
votes
1 answer

Shared EventBus for multiple Applications and Containers for Reactor

I am looking how is it possible with Spring Boot and Reactor to have multiple applications (each one running on its own Spring Boot container) that use one common/shared EventBus running in a stand-alone container. It is a Microservice environment…
Andrea T
  • 3,035
  • 4
  • 23
  • 39
8
votes
2 answers

Example of Akka EventBus for Java

Need some advice of how to use EventBus provided by Akka in Java (not Scala!). The documentation on website seems to be incomplete: http://doc.akka.io/docs/akka/2.0.1/java/event-bus.html As far as I understood, actor should be created to react on…
jdevelop
  • 12,176
  • 10
  • 56
  • 112
7
votes
1 answer

"Fragment already added" occurs sometimes while using EventBus with ViewPager

I am using EventBus to navigate from one fragment to another after a button click. Sometimes and not reproducible the following error comes up: Fatal Exception: java.lang.IllegalStateException: Fragment already added: FragmentQuestion3_2{82d0763}…
Kaiser
  • 606
  • 8
  • 22
7
votes
1 answer

vertx IllegalArgumentException: No message codec for type - how to create a consumer for a custom type

I have a verticle that creates an event bus consumer as follows: public void start() { vertx.eventBus().consumer(ADDRESS_REQUEST, this::handleRequestMessage); } private void handleRequestMessage(Message msg)…
Orkun
  • 6,998
  • 8
  • 56
  • 103
7
votes
2 answers

How to use Call Type with EventBus

I am using EventBus to notify Activity/Fragment when I get response from the server. Everything works good so far, but problem arises when I consume two network calls in same Fragment or Activity. The problem is the same method onEvent(String…
Zeeshan Shabbir
  • 6,704
  • 4
  • 38
  • 74
7
votes
1 answer

EventBus 3.0 registerSticky deprecated

Cannot resolve method registerSticky(this) in place of register(this) @Override public void onStart() { super.onStart(); EventBus.getDefault().register(this); } I have tried 'org.greenrobot:eventbus:3.0.0' and…
MrBoutte'
  • 349
  • 4
  • 14
7
votes
2 answers

Greenbot Eventbus 3.0: What is the difference between onEvent, onEventMainThread, onEventBackgroundThread and onEventAsync?

I am a bit confused with the usage of onEvent, onEventMainThread, onEventBackgroundThread and onEventAsync in Greenrobot's EventBus 3.0 From what I see in the documentation: onEvent is used with ThreadMode.POSTING (default) onEventMainThread is…
grim
  • 6,669
  • 11
  • 38
  • 57
7
votes
1 answer

Best practice design on vertx. Eventbus or Singleton for repositories

I am using vertx3 I need to use redis in order to set and get values.(Redis might be changed to something else in the future) Iam looking for best practice design for my implementation. I am working on vertx cluster and I need to retrieve a messages…
rayman
  • 20,786
  • 45
  • 148
  • 246
7
votes
1 answer

Advantages of injecting Otto event bus instead of using static singleton

In my Android apps i'm using Otto as event bus and Dagger for dependency injection. In the userguide of Otto and in many blog posts it's recommended to use injection to get a bus singleton. I have done that for some time, but lately i'm getting more…
7
votes
1 answer

Does Akka's event bus guarantee message order?

I would like to keep the order the events entered the bus. For example if event1 then event2 where entered to the bus then a subscribed actor would get them in that order. The question is if such order is guarantee, both on clustered and on single…
Noam Shaish
  • 1,613
  • 2
  • 16
  • 37
7
votes
4 answers

greenrobot EventBus post event in Android

By using EventBus, I need to post an event(MyEvent) in an Activity and receive the event in another Activity in Android. I tried the greenrobot EventBus performance test project but could not get how to do it. I tried in ActivitySubscriber MyEvent…
ronie
  • 121
  • 1
  • 1
  • 4
6
votes
1 answer

One topic per event producer VS One topic shared across multiple producers messaging architecture

This is a bit of general question because it would apply not only to my scenario (with Azure Service Bus) but to any event bus in the context of publish/subscribers with events. The question is: Is there any preference towards having an…
6
votes
3 answers

How do I configure Vert.x event bus to work across cluster of Docker containers?

In my current setup, I'm using the default multicast option of the Hazelcast cluster manager. When I link the instances of my containerized Vertx modules (via Docker networking links), I can see that they are successfully creating Hazelcast cluster.…
Psycho Punch
  • 6,418
  • 9
  • 53
  • 86
1 2
3
29 30