Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for event externalization into Redis #786

Open
yeahfo opened this issue Aug 26, 2024 · 4 comments
Open

Support for event externalization into Redis #786

yeahfo opened this issue Aug 26, 2024 · 4 comments
Assignees
Labels
in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter type: enhancement Major enhanvements, new features

Comments

@yeahfo
Copy link

yeahfo commented Aug 26, 2024

e.g. spring-modulith-events-redis message broker Spring Modulith artifact.

@odrotbohm
Copy link
Member

Care to edit your description to elaborate a bit on what you're looking for?

@odrotbohm odrotbohm added the meta: waiting for feedback Waiting for feedback of the original reporter label Aug 26, 2024
@odrotbohm odrotbohm self-assigned this Aug 26, 2024
@yeahfo
Copy link
Author

yeahfo commented Aug 26, 2024

Care to edit your description to elaborate a bit on what you're looking for?

Thank you for your reply. My idea is to support Redis as an external event message broker, just like the currently supported kafka/AMQP, as an additional options.

@martinbeentjes
Copy link
Contributor

Have you looked at the interfaces provided by the framework itself? If I look at https://github.com/spring-projects/spring-modulith/tree/471065c113a025ccd75f550989879a2d97ca22bb/spring-modulith-events/spring-modulith-events-amqp/src/main/java/org/springframework/modulith/events/amqp for example, the configuration to externalize to Redis is not that difficult. It might be doable by yourself.

I am working on doing a similar piece of work, but that is for the persistance of the events into a database. An alternative to the JdbcEventPublicationRepository.

With the help of the documentation, I am getting quite far.

@odrotbohm
Copy link
Member

I am not a Redis expert and don't know what choices to serialize the event and obtain the routing information would make sense in a Redis world. It looks like Chris is making some deliberate decisions in his integration, but I cannot judge, how reasonable any of this is (I assume it is fundamentally reasonable because it's Chris, but I don't want to blindly copy these assumptions without understanding the tradeoffs).

So if some Redis expert was willing to elaborate on how it is used idiomatically and what decisions would need to be made or could be defaulted to if all we start from is an event plus means to define a target, I'd be willing to investigate the option to add something out of the box. Until then, I'd love to see what others come up with, as — as @martinbeentjes suggested — implementing something from scratch should not be difficult. In fact, you wouldn't even necessarily use the base class, the existing store implementations build upon. A simple @Async @TransactionalEventListener using the (Spring Data) Redis infrastructure would be fine to both get it working and give us the chance to study the translation needs.

@odrotbohm odrotbohm changed the title spring-modulith-events-redis (redis streams) support ? Support for event externalization into Redis Sep 24, 2024
@odrotbohm odrotbohm added in: event publication registry Event publication registry type: enhancement Major enhanvements, new features labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter type: enhancement Major enhanvements, new features
Projects
None yet
Development

No branches or pull requests

3 participants