Docs / API Reference
Axon.Client
GoAxon.Client — enqueue jobs, schedule recurring jobs, and execute jobs dispatched to this process.
AddAxonClient
Registers IAxonClient and opens a persistent SignalR connection to {baseUrl}/hubs/axon, with automatic reconnect. Call once in startup.
- baseUrl string — where
Axon.Serveris hosted, e.g."https://localhost:7221". Trailing slashes are trimmed automatically.
IAxonClient
Enqueues methodCall to run as soon as a connected device picks it up. Returns the new job's id once the server has durably stored it — awaiting this does not wait for the job to actually run. A generic overload, EnqueueAsync<TType>, targets a method on a specific type.
Like EnqueueAsync, but the job only becomes eligible for dispatch after delay has elapsed. An overload taking DateTimeOffset scheduledFor schedules for an absolute time instead. Both have generic <TType> variants.
Enqueues a job that only runs after parentJobId reaches a terminal state: promoted on the parent's success, or on the parent's failure only if continueOnParentFailure is true (default false — the continuation is left permanently unscheduled if the parent fails).
Creates or updates a recurring job on a cron schedule. A matching RemoveRecurringAsync(string recurringJobId, ...) deletes it.
Every overload takes a strongly-typed expression tree, not a string method name — the compiler checks the call. Arguments are captured and JSON-serialized; the method's declaring type is never loaded by Axon.Server, only referenced by name.