Questions tagged [event-handling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Dispatching an event in the decorator or use some other design pattern entirely?

Disclaimer: before explaining the problem here I am aware that the answer to the question might be a subject of an opinion. The reason I am asking this question is because I still believe that there ...
user avatar
1 vote
1 answer
121 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 "...
user avatar
  • 119
0 votes
0 answers
29 views

Pattern for high throughput ingestion of events originating outside k8s cluster

I am trying to create an architecture for a system of ours to ingest data from devices. Our back end is built in Azure AKS with some PaaS services linked into the VNET. The cluster already exists, and ...
user avatar
  • 101
0 votes
0 answers
28 views

Best approach for web app that handles events and is stateful with websockets

I've got a web app in AsNetCore (.NET 5) This app subscribes to a message bus, (with MassTransit over AWS SQS transport layer), so when it receives a new event/message it reacts to it and dequeues ...
user avatar
  • 339
3 votes
2 answers
235 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 ...
user avatar
0 votes
2 answers
199 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. ...
user avatar
  • 101
0 votes
1 answer
104 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 ...
user avatar
0 votes
2 answers
59 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 ...
user avatar
0 votes
1 answer
73 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 ...
user avatar
1 vote
2 answers
86 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). ...
user avatar
  • 786
0 votes
2 answers
61 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. ...
user avatar
  • 109
1 vote
2 answers
163 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 ...
user avatar
1 vote
1 answer
151 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 ...
user avatar
  • 281
2 votes
3 answers
152 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 ...
user avatar
1 vote
1 answer
223 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 ...
user avatar
  • 147
-3 votes
2 answers
111 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 ...
user avatar
0 votes
3 answers
1k 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 ...
user avatar
1 vote
0 answers
121 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 ...
user avatar
11 votes
4 answers
3k 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 ...
user avatar
  • 259
5 votes
2 answers
1k 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. ...
user avatar
-1 votes
4 answers
369 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 ...
user avatar
-2 votes
1 answer
131 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 ...
user avatar
  • 97
2 votes
2 answers
520 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: ...
user avatar
2 votes
1 answer
137 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 ...
user avatar
1 vote
1 answer
547 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
335 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 ...
user avatar
1 vote
0 answers
83 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 ...
user avatar
  • 2,402
2 votes
3 answers
417 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 ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
0 votes
1 answer
97 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 ...
user avatar
  • 13
2 votes
3 answers
2k 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'...
user avatar
  • 275
0 votes
1 answer
435 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 ...
user avatar
0 votes
1 answer
311 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 ...
user avatar
6 votes
2 answers
2k 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 ...
user avatar
2 votes
3 answers
995 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 ...
user avatar
1 vote
1 answer
107 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 ...
user avatar
  • 121
3 votes
3 answers
2k 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.
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 ...
user avatar
2 votes
3 answers
394 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 ...
user avatar
  • 8,977
-1 votes
2 answers
116 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 ...
user avatar
-5 votes
1 answer
474 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 ...
user avatar
0 votes
0 answers
174 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" (...
user avatar
  • 1,799