Skip to content

Conversation

Jeroeny
Copy link
Contributor

@Jeroeny Jeroeny commented Sep 3, 2023

Q A
Branch? 6.4
Bug fix? no
New feature? yes
Deprecations? no
License MIT

The messages in a schedule (RecurringMessage) are created at compile time, per Trigger. This means a trigger will always give the same message. This limits the usefulness of the component, because messages can often be dynamic. E.g. with a specific payload from the database or with a Uuid per message (often the case with architectures like EventSourcing / cqrs).
Also there is no way for a trigger to only 'check' what the getNextRunDate is, without always triggering a message.

This PR makes it possible to yield zero or more messages when a trigger is triggered. Due to the trigger being a method, the messages can be created at runtime, with a unique payload (or directly serving messages from a DB table).
Since the component is still experimental in 6.3, it's probably good to get something like this in before 6.4 is released.

@Jeroeny Jeroeny force-pushed the schedule branch 2 times, most recently from a969434 to 8869bd7 Compare September 15, 2023 09:45
Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. I've made a few small suggestions.

@fabpot
Copy link
Member

fabpot commented Sep 27, 2023

Thank you @Jeroeny.

@Jeroeny
Copy link
Contributor Author

Jeroeny commented Sep 27, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants