Message Injection
This section covers how to programmatically inject messages into your microservice for processing, including scheduled and one-time injection.
Overview
Message injection allows you to create and process messages programmatically without receiving them from external sources. This is useful for:
Timers and Periodic Tasks - Execute business logic on a schedule
State Initialization - Bootstrap your store with initial data
Workflow Orchestration - Trigger multi-step processes
Injected messages are processed exactly like externally-received messages: they're dispatched to handlers and execute within transactions with full consensus guarantees.
Injection Patterns
One-Time Injection - Inject a single message for immediate processing
Scheduled Injection - Schedule messages to execute at specific times or intervals
Initialization Messages - Special handling for first/initial messages during startup
Topics
Injecting Messages - Programmatically create and inject messages for processing
Scheduling Messages - Schedule messages for future or periodic execution
Related Topics
Initializing the Microservice - Use first/initial messages for initialization
Message Processing - How injected messages are processed
Last updated

