Skip to main content

Questions tagged [event-handling]

Filter by
Sorted by
Tagged with
4 votes
3 answers
229 views

How to handle events representing cross-domain knowledge

I've been looking at DDD lately as part of playing with Spring Modulith, and I'm getting hung up a bit on how to approach events which cross between contexts. To provide a concrete example based on a (...
Simon Geard's user avatar
1 vote
0 answers
111 views

DDD -Can an aggregate consumes its own events?

I'm facing to an issue with my design in DDD with "Always valid Domain Model" principale and eventual consistency. I have an aggregate with several public methods to mutate its state. class ...
Paul Contremoulin's user avatar
1 vote
2 answers
96 views

CQRS how to display failed commands in the GUI

I am trying to use CQRS in my project and I was thinking how the GUI gets notified about failures in the GUI, when commands are fire and forget. My commandhandlers are not returning anything, but ...
hadamard's user avatar
  • 140
2 votes
2 answers
270 views

Handling parents events from child component, in a props down events up approach

This question is language/framework agnostic. EDIT: The comments and answers have highlighted how different languages approach events differently, which made me realize this question isn't really ...
Michael Haddad's user avatar
1 vote
3 answers
94 views

Refactoring Controllers publishing different events with MediatR library

I have Controller that basically publishes different Event based on some input criteria, simplified version of the logic is here: [HttpPost] public async Task<ActionResult> Create(...
Velocoder's user avatar
  • 129
1 vote
1 answer
84 views

Handling a single event as broadcast and round-robin depending on service

I have Service A that publishes an event to RabbitMQ. I have two instances of Service B that will use the event to write to its database. I have two instances of Service C that will send the event ...
DaveO's user avatar
  • 136
4 votes
2 answers
1k views

Passing data through events to adhere to the Tell-Don't-Ask principle?

In my little WinForm app, intended to practice as a hobbyist, I'm using this code to pass data from the View to its Presenter: public event Action<object, string, string?>? SearchInAlbums; ...
Valmont's user avatar
  • 183
2 votes
1 answer
1k views

In an event-driven system, what are the best practices around the number of events and size/atomicity?

If you can have one event with multiple "things to process" or one event per thing to process, what is considered the best practice? Bearing in mind, the former option may involve persisting ...
Dr. Thomas C. King's user avatar
0 votes
0 answers
110 views

Kafka : Is sending some payload data (identifier) in headers considered a good practive?

I am wondering about some architectonical decisions in our system. There are situations where we are sending import business events through kafka which should be performed in every case. All the cases ...
Drake's user avatar
  • 1
0 votes
1 answer
172 views

Avoiding "handler creep" in React components?

An issue I find myself having with code layout in my React components is that I end up having to define too many handlers. I generally write only functional components with hooks, but within the body ...
temporary_user_name's user avatar
3 votes
1 answer
5k views

Event bus vs PubSub

I have been using queues and PubSub patterns for years but never really came across the terminology "event bus". After some googling I didn't really find a clear distinction between "...
Frankster's user avatar
  • 179
4 votes
2 answers
498 views

Does creating one thread per event subscriber scale well?

I'm working on an application implemented in different microservices, which uses a message broker (event bus) to consume events (simple pub/sub). As for now, in a given microservice, we are spawning 1 ...
underthevoid's user avatar
0 votes
2 answers
464 views

Is there alternative to applying events synchronously in command handler in CQRS?

I have workflow where I have complex command handlers encapsulated inside aggregate. These handlers emit some events, and then further logic based on result of these events can emit more events. ...
chris's user avatar
  • 101
0 votes
1 answer
185 views

How to deal with massively concurrent events?

I got the following interview question: Say the company has this event, where we will create a button on a website and only the first ten clicks will be accepted and win a prize. Assume that there a ...
amazingsaluyot's user avatar
0 votes
2 answers
104 views

Event Driver Microservice Can Storage Sent Message?

I have an event driven architecutre, with many microserver that publish a lot of message in my event bus. In some case i can't track why some process is blocked, maybe because my Service-A haven't ...
FedeC87p's user avatar
0 votes
1 answer
235 views

Designing Integration event application

We have a microservice that integrates with a third party system via REST API to handle appointment booking for our customer. It takes advantage of the event-driven model. Our microservice emits out ...
user2884707bond's user avatar
1 vote
2 answers
289 views

Locking (reserve) related Aggregate Roots

Problem In my application a user can lock a set of related aggregate roots to work exclusively on them and to avoid the usage of an invalid set of objects later in the process (by other employees). ...
deamon's user avatar
  • 876
0 votes
2 answers
73 views

Setting custom callbacks in a Javascript applet?

I'm designing a 3D visualisation applet in Javascript. When used, a Canvas will be created and placed inside an HTML element on a webpage, specified by the developer who is implementing the applet. ...
Okarin's user avatar
  • 109
1 vote
2 answers
370 views

How to make consumer idempotent when publisher publishes "at least once"?

I'm trying to implement microservices and I'm still super new to the subject, but, I was able to answer most of questions. However, one of the questions that I can't come up with a good solution to is ...
typicallearner's user avatar
1 vote
1 answer
275 views

C# design for handling a high rate of async network operations that complete with a callback (hundreds per second)

I am working with a message broker technology, to which events will be published (following an "event carried state transfer" architecture) for consumption by other applications. The vendor ...
allmhuran's user avatar
  • 316
2 votes
3 answers
782 views

Subscribe to topics or to messages on those topics?

I've encountered a couple of different techniques for dealing with service bus messaging (queues and topics) and I'm just looking for some input on best practices. I've encountered a couple of ...
Sinaesthetic's user avatar
1 vote
1 answer
372 views

How would a Search API microservice fit in an event driven architecture?

I apologize if this sounds really strange. I am very new to System Design and have just been reading up on Event driven systems. To gain better understanding and to perfect my thought process I ...
Saturnian's user avatar
  • 157
-3 votes
2 answers
655 views

How large should messages in an event queue be? [closed]

I am working on a system where I am planning to send a large amount of data in a message to an event queue. About 150 or so small objects. I know the technology should be able to handle this, but is ...
Forrest Keller's user avatar
3 votes
3 answers
3k views

How does "event triggers event" really work in Event Sourcing / CQRS?

After reading/watching a lot about Event Sourcing, there is one thing I don't fully understand: Events that lead to triggering of other events. Let's take StackExchange's "close question" feature as ...
bluenote10's user avatar
1 vote
0 answers
252 views

Clear Applcation Cache with Event Domain DDD

I want to clear my application cache after updating an element of my domain. In that case I raise an event NodeEndPointReferenceChangedEvent from my Domain Layer. The cache in managed in Services ...
FedeC87p's user avatar
11 votes
4 answers
5k views

Is the C# EventHandler designed the wrong way?

State of the union: C# Events/Eventhandlers are: blocking throwing Exceptions sequential deterministic executed in order MulticastDelegates a handler is always dependent on the behavior of the ...
juwens's user avatar
  • 258
5 votes
2 answers
2k views

Handle failures in Event Driven Architecture

Suppose you have a bounded context with ~30 business events and, for simplicity sake, the same number of commands like ChangeUserEmailCommand -> UserEmailChangedEvent initiated from a web UI. ...
UserControl's user avatar
-1 votes
4 answers
1k views

Is opening a new thread for each event you want to handle the best way to handle events?

I know 100% that there already is a solution out there for what I am asking but with all the research I have done, I can't seem to find it. Problem: Currently, a CS student trying to do independent ...
Ameer Abdallah's user avatar
-2 votes
1 answer
227 views

ActiveMQ for event driven architecture

I am using ActiveMQ and I have a scenario where I need to update the event for 100 consumers parallelly. I am looking for a solution where the 100 consumers receive the event parallelly (i.e there ...
Harry's user avatar
  • 97
2 votes
2 answers
779 views

Error handling in an event driven system

The context I have two components A & B, which communicate through events . Components B is responsible for long running background processes and it listens to the following event: ...
Cap Barracudas's user avatar
2 votes
1 answer
317 views

Event Handling in Pygame

I am working on setting up a game in pygame and I've noticed that there isn't really a lot available for event handling. Basically, pygame has a queue of events that you can pull and iterate through ...
severestrength's user avatar
2 votes
1 answer
1k views

Whats a proper way to design a GUI event system?

I'm trying to write a GUI library for a project (also for learning purposes) from scratch (in C++), and it's working pretty well, but since this is my first attempt i feel that the design of the event ...
user avatar
0 votes
1 answer
763 views

How To Design Event Handlers With Different Parameters

I have an interface Event and a class Agent. I want to be able to write something like agent.handle(event). However, the classes that implement the event interface will all have different fields ...
Jordan Mackie's user avatar
1 vote
0 answers
170 views

Is there a standard convention for onChange handlers for react components?

It seems that some components like to pass an event as the first (or only) argument for a change event, eg (the native input, Material-UI's TextField) and then the programmer accesses the value with ...
dwjohnston's user avatar
  • 2,677
2 votes
3 answers
592 views

Serialization of messages on a servicebus and microservice architecture

In a microservice-based system, it exist some principles. Sam Newman often refers to them as these: You should always model your application around the domain A culture of automation. Automate whats ...
Tobias Moe Thorstensen's user avatar
0 votes
1 answer
165 views

Best practices for fixing bugs in event stream processing [closed]

We are working on an event driven system that works a streaming technology (eventhub/kinesis/kafka). Imagine some system is generating events that are sent to the event stream. Then there are ...
Martin Kosicky's user avatar
0 votes
1 answer
106 views

Multithreading - 2 active running threads calling each other without blocking itself

I have an implemented UDP receiver which is continuously receiving DTN packets (UDP encapsulated) and performing some operations on them. This whole process is working on a single main thread. However ...
Caspian's user avatar
  • 13
2 votes
4 answers
3k views

Domain Events, CQRS, and dependency resolution in handlers

Currently: ASP.NET Core 2.2. I've been doing quite an extensive research in this topic (Domain Driven Design used together with Clean Architecture): DDD: Where to place domain event handlers? And I'...
Jose A's user avatar
  • 305
1 vote
1 answer
694 views

DDD - Handling temporary inconsistency when handling domain events

I realize that DDD advocates eventual consistency, thus allowing for a certain period of time in which the system might be inconsistent. Embracing eventual consistency, we can therefore model our ...
Stefan Rendevski's user avatar
0 votes
1 answer
481 views

Consuming messages directly from a queue which belongs to a third party system

We are working on a project which interacts with multiple third party systems and they need each other's data to function. Now, for some data which needs to be in sync in multiple systems, we are ...
Rishikesh Dhokare's user avatar
6 votes
2 answers
3k views

How to deal with file events with microservice that exposes a REST API

A bit of context. The company where I work is starting to transition to a modular architecture (something similar to microservices) for our main product, currently monolithic. The first step is to ...
GalacticDessert's user avatar
2 votes
3 answers
2k views

What should a method which creates conditionally self-unsubscribing event-handlers be named?

I develop/maintain an in-house library in a growing company with about 12 other developers that write code. This library is mostly used for scripting game behavior and we have many different projects ...
Sindri Jóelsson's user avatar
2 votes
1 answer
130 views

What kind of granularity is recommended in reactive programming when publishing state change events?

I'm currently developing an application using reactive programming. Every entity creation or modification in the system publishes an event and no two entities can be created/modified within the same ...
Kilian's user avatar
  • 131
3 votes
3 answers
3k views

DDD: How to properly process events without using Event Store or Event Sourcing

Does this make sense or what is wrong with this approach? So instead of using event store, we may use aggregate repository to update the aggregate based on values contained in published event.
Slimer's user avatar
  • 217
4 votes
2 answers
4k views

How do event sourced systems make sure the read model is only updated once?

Currently looking into Event Sourcing in a Microservices architecture and I've found this article. It describes a possible implementation of CQRS and event sourcing. If the logic dealing with updating ...
Torsten N.'s user avatar
2 votes
3 answers
495 views

Reducing mutability in an event-driven system

I'm building a game with the LibGDX game engine. The engine works by registering an implementation of an interface that receives callbacks on the game loop. The interface looks like this: public ...
Samuel's user avatar
  • 9,217
-1 votes
2 answers
151 views

How to swap between 2 third-party providers when both implement different events?

I have 2 third-party providers, both do a similar function(this could be logging, messaging, etc), and both have events that the client must subscribe to. I want to know what design patterns or ...
user197619's user avatar
-5 votes
1 answer
685 views

What design patterns to use for swapping RabbitMq and Kafka messaging systems

This is quite a general question. I want to design a set of classes and interfaces so I can swap between messaging systems without changing code, probably between RabbitMq and Kafka. My main concern ...
user197619's user avatar
0 votes
0 answers
227 views

Is the HTML / JavaScript event handling exactly the Chain of Responsibility design pattern?

Just except that Chain of Responsibility might go one straight line, but in the HTML event handling, it is first the "capture phase" (capturing), then the "at phase", and then the "bubble phase" (...
nonopolarity's user avatar
  • 1,837