Skip to content

[microservices] Extend EventPattern to listen for event types within a specified topic with Kafka [type:feat] #6119

@taj-p

Description

@taj-p

Feature Request

The current strategy of topic creation for kafka microservices does not follow best practice. For each EventPattern decorator in some Kafka microservice controller, a new topic is created in Kafka. This is contrary to best practices (see: confluent article). Rather, I think it is argued that related event types should be grouped within a single topic.

This is important primarily for ordering of events. Kafka maintains the ordering of messages only within a topic-partition, not between topics. This means that listeners of some topics could see them in a nonsensical order. Moreover, this can cause issues for Kafka users who want to use EventSourcing or save their Kafka topics for replayability / recovery.

My suggestion is to allow a user to set the topic within an EventPattern and then the pattern matches an event type within that topic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions