hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[Refactor] Convert KafkaStore to EventStore

Open lsampras opened this issue 1 year ago • 3 comments

Currently we have hardcoded KafkaStore as a composite of StorageInterface along with a kafka producer, However we wanna make this more generic by substituting KafkaProducer with a generic MessageInterface

The final structure of EventStore would look like

#[derive(Clone)]
pub struct EventStore<T: StorageInterface, E: MessagingInterface> {
    event_producer: E,
    storage: T,
}

This refactor could be done in 2 parts as follows

  1. Use MessageInterface as a generic trait instead of fixed KafkaProducer
  2. Remove KafkaMessage trait implementations and use MessageInterface instead

lsampras avatar Apr 29 '24 13:04 lsampras

Hey @lsampras! I would like to help with this issue. Can I work on this?

rishav-bose0 avatar May 04 '24 08:05 rishav-bose0

Hi @rishav-bose0, since this change is slightly spread out throughout the code base, I'd prefer if we connect on either slack or discord to formulate & plan the approach to solve this...

lsampras avatar May 06 '24 07:05 lsampras

sure, I too had some doubts on the generic replacements. Let's connect on discord.

rishav-bose0 avatar May 08 '24 06:05 rishav-bose0

Hey! Is this still open?

speedhs avatar Sep 08 '24 18:09 speedhs

Hey @speedhs thanks for the interest, unfortunately this issue is no longer relevant... Feel free to take a look at some of our other open issues

lsampras avatar Sep 10 '24 19:09 lsampras