I wonder, how do you avoid notifying all services that consume the same event? For example, service A and service B both of them consume event X. Based on some rules you want to send the event X only for service A. I am not talking about consumer groups (kafka) or even correlation-Id. As I am using Event-Driven microservices with the approach of command & event.
Microservice Event driven communication - how to notify the caller only on command / event approach
89 Views Asked by Eddy Bayonne At
1
There are 1 best solutions below
Related Questions in MICROSERVICES
- How can microservices be truly independent when using an ESB (i.e. MassTransit)?
- Microservices and cloud resource limitations
- What's the correct way to embed a remote AngularJS application into a webpage?
- Dropwizard Jersey Client Sample
- Docker auto spawning required connected container types on demand
- Micro Service cross service dependencies
- Keep microservices data consistent
- Setting up rabbitMQ on docker with python
- Adding an item in a microservice, with reference to another one
- Spray microservice assembly deduplicate
- How do you manage per-environment data in Docker-based microservices?
- How to get a visualization of cross-app Spring Integration flow?
- Microservices authentication
- Building authentication with Microservices Architecture
- Microservices service registry registration and discovery
Related Questions in KAFKA-CONSUMER-API
- kafka: what do 'soTimeout', 'bufferSize' and 'minBytes' mean for SimpleConsumer?
- Kafka multiple consumers for a partition
- How to fix NoClassDefFoundError with custom Kafka producer under Eclipse?
- Kafka Consumer to read from multiple topics
- How to use Consumer API of Kafka 0.8.2?
- Kafka Error fetching offset data. Reason: 1
- Why Kafka consumer performance is slow?
- What does "Rebalancing" mean in Apache Kafka context?
- what is topic count parameter for Kafka ConsumerConnector
- Kafka client 0.10.0.0 Java not getting duplicate record more than 2499
- Spring Stream Kafka re-reads all messages
- What is use of "spark.streaming.blockInterval" in Spark Streaming DirectAPI
- Kafka consumer failure detection
- Not able to convert the byte[] to string in scala
- Spark Streaming: Issues when processing time > batch time
Related Questions in DISTRIBUTED-SYSTEM
- Is curator's persistent ephemeral nodes just regular ephemeral with retries?
- Sequential Consistency in Distributed Systems
- Elastic Search: how to move a primary shard?
- Hbase: Understanding difference between smallCompactions and largeCompactions under majorCompaction
- Mnesia - Replicate ram_copy table to disc_only_copy table from another node
- Logical Clocks: Lamport Timestamps
- Lamport’s (Physical) Clock Synchronization Algorithm
- distributed database replication design: efficient network transfer
- Use SimPy to simulate Chord distributed system
- How CreateEntity PDU works?
- How to automatically update server and client side in java
- Distributed database use cases
- Pass map, slice over channel and over network?
- Creating a distributed memory service in Scala
- What is the biggest Couchbase cluster nodes number?
Related Questions in SPRING-CLOUD-STREAM-BINDER-KAFKA
- Join one-to-many relation with spring cloud kafka stream
- KeyValueStore.get() returns inconsistent results
- How to Store failed data on sending to topic in spring cloud stream kafka
- Spring Cloud Stream content-based routing on payload
- Kafka Streams - Disable creation of internal topic "changelog"
- Getting java.lang.ClassCastException on consuming an event payload of generic type
- Kafka consumer graceful shutdown in spring cloud stream
- Propagate traceparent header when using recordMetadataChannel
- spring cloud stream failed with IllegalStateException: deploymentId doesn't match expected state
- Schema Registry with Spring cloud stream Binder and Json deserializer
- Is it possible to pause SCS Kafka so it doesn't consume messages when application is not ready/healthy?
- Spring cloud Stream function not recognized
- @StreamListener doesn't work for secured Kafka streaming, TopologyException
- How to configure Kafka streaming security?
- How to send message from Kafka to topic with Spring Cloud
Related Questions in ASYNCHRONOUS-MESSAGING-PROTOCOL
- The amp-next-page functionality does not work, namely loading the following content
- vast / vpaid video can run amp-video ads?
- How to add AMP User Events with NextJs
- Validate script in amp
- Malformed URL found for attribute ‘publisher-logo-src’ in tag ‘amp-story’
- Microservice Event driven communication - how to notify the caller only on command / event approach
- Chaining deferred callbacks
- LoopingCall AMP commands
- AMP tap event to class
- Show Lightbox based on a condition AMP for EMAIL
- Why the title I am writing for the post is not showing but another title is showing?
- How is the configuration of Google Analytics 4 with AMP?
- All my AMP pages have "Alternate page with proper canonical tag" error
- 301 Redirect with characters at the end of the link
- AssertionError: No inf checks were recorded for this optimizer - Unable to find a solution, despite multiple attempts
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I think it's quite easy by using Kafka partitions/partition-key. For example: In your topic X, you could just create it with many partitions. For each invocation, every service must specify its key, so based on the key, Kafka will do the rest of the job. So every time Service A sends a command, the consumer Service (the one who handles the command) will send the event with the same key. So in the end, Service A (the producer of the command) will receive the event on its own partition and will be the only service receiving it. So based on the Command/Event approach it may work.
On the other hand, by doing so, you are limiting one of the main benefits of partition which is allowing the scalability.