-
Notifications
You must be signed in to change notification settings - Fork 10
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
How does event listening work? #114
Comments
Basically storage methods are all providing data from database itself, there are also notifications for updates (both in journal and outbox), so you can listen to them and read when necessary. edomata/modules/backend/src/main/scala/OutboxConsumer.scala Lines 47 to 56 in ea3a754
|
What do you mean by different time intervals? Are they running in parallel? |
Yes, running on different zio fibers. |
Is your problem solved? |
I'm using two ZIO scope blocks in my codebase one of them is for creating commands and the other for listening if an event published. When the command and the listener are in the same code block and run sequentially, there is no problem, but when they are run in different time intervals, the listening side does not receive information. How can I solve this?
There is a pub/sub mechanism or it's reading from the database?
Command code block like this example; https://github.com/hnaderi/edomata-example/blob/05609b7f54388dae89b9a925eea21b794db9fd39/core/src/main/scala/dev/hnaderi/example/Main.scala#L47
Listening code block
The text was updated successfully, but these errors were encountered: