Authoring User Code
This section covers how to write the business logic for your Talon microservice. Topics are organized by functional area to help you find the right information quickly.
Overview
Talon microservices are event-driven applications that process messages within automatic transactions. Your user code defines:
What consensus model to use - Event Sourcing or State Replication
How to initialize - Lifecycle hooks and startup behavior
How to process messages - Business logic in message handlers
How to inject messages - Programmatic and scheduled injection
How to expose commands - Administrative control points
How to expose metrics - Custom telemetry and monitoring
Getting Started
New to Talon? Start here:
Consensus Model - Choose and configure your HA policy
Lifecycle - Understand initialization and shutdown
Message Processing - Write your first message handlers
Read Programming Fundamentals before writing handlers
Categories
Consensus Model
Configure your microservice's high availability and consensus behavior.
Specifying The HA Policy - Choose Event Sourcing or State Replication
Lifecycle
Implement lifecycle methods that the Talon runtime invokes during your microservice's lifecycle.
Lifecycle methods include accessor methods (provide data to runtime), injection methods (receive runtime objects), and notification methods (handle lifecycle events).
Implementing Lifecycle Methods - Implement accessor, injection, and notification methods
Initializing the Microservice - Handle first and initial messages
Message Processing
Process inbound messages and execute business logic.
Filtering Messages - Selectively process messages
Processing Messages - Core message handling
Handling Messages - Write message handlers
Sending Messages - Send outbound messages
Unhandled Messages - Handle messages with no registered handler
Message Injection
Programmatically create and inject messages for processing.
Injecting Messages - Inject messages programmatically
Scheduling Messages - Schedule future or periodic messages
Command and Control
Implement administrative commands for runtime control.
Implementing Command Handlers - Create custom administrative commands
Monitoring
Expose custom statistics and telemetry from your microservice.
Exposing Application Stats - Define custom metrics using
@AppStat
Related Topics
Microservice Template - Template-specific guidance for Event Sourcing and State Replication
Configuring Messaging - Set up message bus connections and subscriptions
Configuring the Microservice Runtime - Runtime configuration and tuning
Concepts & Architecture - Understand how Talon works
Last updated

