TickerNet · coming from TickerQ
Migrating from TickerQ
TickerNet is TickerQ's code as of commit 3acd0f31 with every TickerQ name changed to TickerNet. Your data carries over: table, collection and key names are the same. Your code needs new package references and namespaces, and a few names your monitoring or proxy may depend on have changed.
Before you start
- Which TickerQ. This guide is for TickerQ 10.4.x and earlier open-source releases. It was checked against the TickerQ code at the fork point, commit
3acd0f31, which is four commits after the 10.4.0 package. - .NET 10 or later first. TickerNet targets .NET 10 and .NET 11 (ADR 0012). If you are on a TickerQ 8.x or 9.x release for .NET 8 or 9, move your app to .NET 10 or 11 first (ADR 0006).
- Packages. TickerNet's packages are on nuget.org. Getting started shows how to add them.
- One behaviour change: jobs started at once outlive the call that added them. When a job is dispatched straight away, for example a time job added with
AddAsyncorAddBatchAsyncfor now or the next second, or a cron run started from the dashboard, it no longer runs with theCancellationTokenyou passed to that call. It runs with the host's stopping token. In TickerQ, cancelling that token, for example by the end of the HTTP request that added the job, could cancel the job or leave itInProgress. To cancel one job, useTickerCancellationTokenManager.RequestTickerCancellationById. - TickerQ Hub. TickerQ Hub, a hosted service with its own terms, isn't supported (ADR 0005). If you ran jobs on remote workers with
TickerQ.RemoteExecutorandTickerQ.SDK, TickerNet does it without a hosted service:TickerNet.Hubin the scheduler andTickerNet.Workerin the workers. Jobs stored asfunction@nodekeep working. See section 06 and Remote workers.
If you are on 10.4.0, you also pick up the four TickerQ commits that came after it and before the fork: ActivitySource tracing built into the core packages (EnableActivitySource()), OpenTelemetry packages at 1.15.3 or later, a change to how the dashboard sends cron runs over SignalR, and the new MongoDB store.
Packages
Each TickerQ package has a TickerNet package of the same shape, except the two remote-execution packages, which have replacements. All share one version, starting at 1.0.0.
| TickerQ package | TickerNet package | Notes |
|---|---|---|
TickerQ | TickerNet | Carries the source generator, as before. |
TickerQ.Utilities | TickerNet.Utilities | |
TickerQ.EntityFrameworkCore | TickerNet.EntityFrameworkCore | |
TickerQ.Caching.StackExchangeRedis | TickerNet.Caching.StackExchangeRedis | |
TickerQ.Dashboard | TickerNet.Dashboard | |
TickerQ.Instrumentation.OpenTelemetry | TickerNet.Instrumentation.OpenTelemetry | |
| none in 10.4.0 | TickerNet.MongoDB | The MongoDB store was added to TickerQ after the 10.4.0 package, at the fork point. |
TickerQ.RemoteExecutor | TickerNet.Hub | A replacement, not a rename. It goes in the scheduler, and workers connect to it directly instead of through TickerQ Hub. See section 06. |
TickerQ.SDK | TickerNet.Worker | A replacement, not a rename. It goes in each worker app. TickerQ's Node SDK has no counterpart. |
Namespaces and API
The rename replaced TickerQ with TickerNet everywhere, in any letter case, and changed nothing else.
Every namespace moved: TickerQ.DependencyInjection is now TickerNet.DependencyInjection, TickerQ.Utilities.Base is now TickerNet.Utilities.Base, and so on. TickerQ.TickerQThreadPool is now TickerNet.TickerNetThreadPool. Public types and members with TickerQ in their name changed the same way:
| TickerQ | TickerNet | Where |
|---|---|---|
AddTickerQ(...), AddTickerQ<TTimeTicker, TCronTicker>(...) | AddTickerNet | TickerNetServiceExtensions |
UseTickerQ(TickerQStartMode) | UseTickerNet(TickerNetStartMode) | TickerNetServiceExtensions |
TickerQStartMode | TickerNetStartMode | TickerNet.Utilities.Enums |
AddTickerQDiscovery(...) | AddTickerNetDiscovery | TickerNetDiscoveryExtension |
TickerQServiceExtensions, TickerQEndpointExtensions, TickerQDiscoveryExtension | TickerNetServiceExtensions, TickerNetEndpointExtensions, TickerNetDiscoveryExtension | TickerNet.DependencyInjection |
TickerQDbContext, TickerQDbContext<TTimeTicker, TCronTicker> | TickerNetDbContext | TickerNet.EntityFrameworkCore.DbContextFactory |
TickerQEfCoreOptionBuilder<,> | TickerNetEfCoreOptionBuilder<,> | TickerNet.EntityFrameworkCore |
UseTickerQDbContext<TDbContext>(...) | UseTickerNetDbContext<TDbContext> | EF Core option builder |
ServiceBuilder.TickerQOptionsConfiguration<,,> | ServiceBuilder.TickerNetOptionsConfiguration<,,> | TickerNet.EntityFrameworkCore.Customizer |
TickerQMongoOptionBuilder<,> | TickerNetMongoOptionBuilder<,> | TickerNet.MongoDB |
UseTickerQMongoClient(...) | UseTickerNetMongoClient | MongoDB option builder |
ServiceExtension.TickerQRedisOptionBuilder | ServiceExtension.TickerNetRedisOptionBuilder | TickerNet.Caching.StackExchangeRedis.DependencyInjection |
[TickerQConstructor] (TickerQConstructorAttribute) | [TickerNetConstructor] | TickerNet.Utilities.Base |
ITickerQHostScheduler, ITickerQTaskScheduler, ITickerQDispatcher | ITickerNetHostScheduler, ITickerNetTaskScheduler, ITickerNetDispatcher | TickerNet.Utilities.Interfaces |
TickerQTaskScheduler, IsTickerQWorkerThread | TickerNetTaskScheduler, IsTickerNetWorkerThread | TickerNet.TickerNetThreadPool |
TickerQBaseLoggerInstrumentation | TickerNetBaseLoggerInstrumentation | TickerNet.Utilities.Instrumentation |
TickerQNotificationHub | TickerNetNotificationHub | TickerNet.Dashboard.Hubs |
Names that did not change. Anything without TickerQ in its name kept it: AddOperationalStore, AddStackExchangeRedis, AddDashboard, AddOpenTelemetryInstrumentation, EnableActivitySource, MapTicker, [TickerFunction], TickerFunctionContext, the managers, the entities and TickerHelper. Names that start with TickerQuery or contain TickerQueryable, such as ITickerQueryable, TimeTickerQueryFilter and CronTickerQueryFilter, mean "ticker query" and were left alone.
Doing it in one pass. Commit your work first, then run this from your repository root. It renames TickerQ in C#, project and JSON files and .editorconfig, leaves TickerQuery… names and EF Core migration IDs alone, and changes TQ0nn diagnostic IDs to TN0nn. Review the diff before you commit it.
git grep -lz -e TickerQ -e 'TQ0[0-9][0-9]' -- '*.cs' '*.csproj' '*.props' '*.json' '.editorconfig' \
| xargs -0 perl -pi -e 'next if /\[Migration\(/; s/TickerQ(?!uer)/TickerNet/g; s/\bTQ0(\d\d)\b/TN0$1/g'It does not touch lower-case strings such as "tickerq" or "/tickerq/dashboard"; section 04 lists those. It also leaves TickerQ's version numbers on package references, so swap those for TickerNet project references.
Source generator and diagnostics
Diagnostic IDs moved from TQ to TN. Numbers, meanings and severities are the same.
| TickerQ | TickerNet | Severity | Meaning |
|---|---|---|---|
TQ001 | TN001 | Error | Class must be public or internal to hold [TickerFunction] methods. |
TQ002 | TN002 | Error | Method must be public or internal. |
TQ003 | TN003 | Error | Invalid cron expression. |
TQ004 | TN004 | Error | Missing function name. |
TQ005 | TN005 | Error | Duplicate function name. |
TQ006 | TN006 | Warning | Several constructors; the first is used unless one has [TickerNetConstructor]. |
TQ007 | TN007 | Error | Abstract class contains [TickerFunction] methods. |
TQ008 | TN008 | Error | Nested class contains [TickerFunction] methods. |
TQ009 | TN009 | Error | Invalid parameter. Only TickerFunctionContext, TickerFunctionContext<T> and CancellationToken are allowed. |
TQ010 | TN010 | Error | More than one constructor has [TickerNetConstructor]. |
TQ011 | TN011 | Error | maxConcurrency is below 0 (0 means no limit). |
- Update
#pragma warning disable TQ006,<NoWarn>entries anddotnet_diagnostic.TQ006.severitylines in.editorconfig. The diagnostic category changed fromTickerQ.SourceGeneratortoTickerNet.SourceGenerator. - The generated class in your root namespace is now
TickerNetInstanceFactoryExtensions(wasTickerQInstanceFactoryExtensions), inTickerNetInstanceFactory.g.cs. Update any call to itsInitialize()method, as insamples/TickerNet.Sample.WorkerService. The generatedTickerFunctionsclass kept its name.
Stored and external names
Checked by comparing the code at 3acd0f31 with main. Anything with "tickerq" in it, in any case, changed; nothing else did. For the dashboard address and its saved sign-ins, TickerNet still accepts the old names on its own; for trace names, it can on request.
Changed
| Name | TickerQ | TickerNet | What to do |
|---|---|---|---|
Redis InstanceName default: the prefix for node heartbeats (hb:{node}), the node list (nodes:registry) and the cron expression cache (cron:expressions) | tickerq: | tickernet: | Upgrade every node at once: a TickerQ node and a TickerNet node don't see each other's heartbeats. To keep the old prefix, set InstanceName = "tickerq:" in AddStackExchangeRedis. Old heartbeat and node-list keys expire on their own; tickerq:cron:expressions has no expiry, so delete it by hand. |
DI key for the Redis IConnectionMultiplexer, IDatabase and IDistributedCache | "tickerq" | "tickernet" | Change any [FromKeyedServices("tickerq")] or GetRequiredKeyedService(..., "tickerq") in your code. |
| Dashboard default path | /tickerq/dashboard | /tickernet/dashboard | Nothing for links and bookmarks: GET and HEAD requests to /tickerq/dashboard and anything under it get a temporary redirect (302) to the same page under the dashboard's base path, with the query string kept. Turn this off with DisableTickerQPathRedirect() in AddDashboard. Proxy and access rules still need the new path, or keep the old path with SetBasePath("/tickerq/dashboard"). |
| Dashboard config scripts | __tickerq-config.js, __tickerq-preload.js | __tickernet-config.js, __tickernet-preload.js | Update proxy rules or content security policies that name them. |
| Dashboard browser global | window.TickerQConfig | window.TickerNetConfig | Only matters if you changed the dashboard's web app. |
| Dashboard browser storage keys | tickerq_basic_auth, tickerq_api_key, tickerq_host_access_key, tickerq_bearer_token, tickerq:dashboard:timezone | tickernet_basic_auth, tickernet_api_key, tickernet_host_access_key, tickernet_bearer_token, tickernet:dashboard:timezone | Nothing. When the dashboard opens, it copies each old key to its new name (only if the new key isn't set yet) and removes the old key, so users stay signed in and keep their chosen time zone. |
| Dashboard CORS policy name | TickerQ_Dashboard_CORS | TickerNet_Dashboard_CORS | Only matters if your code refers to the policy. |
| Dashboard OpenAPI tag | TickerQ Dashboard | TickerNet Dashboard | Update OpenAPI filters that use it. |
| ActivitySource name | TickerQ | TickerNet | Change AddSource("TickerQ") to AddTickerNetSource() (the same as AddSource("TickerNet")). The instrumentation scope reported to your tracing backend is TickerNet either way, so filters on the scope name need to change. |
| Span names | tickerq.job.execute.*, tickerq.job.enqueued and the other tickerq.job.* and tickerq.seeding.* spans, tickerq.job_request_serialization.failed | The same with tickernet. in front | Update trace queries, dashboards and alerts, or keep the old names: with the TickerNet.Instrumentation.OpenTelemetry package, call AddTickerNetSource(useTickerQNames: true) on the tracer provider, before any exporter. Spans are then exported as tickerq.*. Off by default. |
| Span tags | tickerq.job.id, tickerq.job.function, tickerq.job.type and the other tickerq.* tags | tickernet.job.id, tickernet.job.function, tickernet.job.type, … | Same as span names: AddTickerNetSource(useTickerQNames: true) exports them as tickerq.*. |
| Log messages | TickerQ Job enqueued: …, TickerQ Job completed: … and the rest | TickerNet Job enqueued: …, TickerNet Job completed: …, … | Update log searches and alerts that match on the text. |
| Logger categories | TickerQ.* | TickerNet.* | Change Logging:LogLevel:TickerQ to Logging:LogLevel:TickerNet. |
| Worker thread names | TickerQ.Worker-{n} | TickerNet.Worker-{n} | Seen only in debuggers and profilers. |
Unchanged
| Name | Value in both |
|---|---|
| EF Core schema and tables | Schema ticker; tables TimeTickers, CronTickers and CronTickerOccurrences, with the same columns, keys and index names (for example IX_TimeTicker_Status_ExecutionTime and UQ_CronTickerId_ExecutionTime). |
| MongoDB collections | Prefix ticker_: ticker_TimeTickers, ticker_CronTickers, ticker_CronTickerOccurrences, with the same index names. The database name is whatever you pass; the package README's example changed from tickerq to tickernet, so keep your own value. |
| Redis store keys | Prefix tq: tq:tt:{id}, tq:tt:ids, tq:tt:pending, tq:cron:{id}, tq:cron:ids, tq:cron:{id}:occurrences, tq:co:{id}, tq:co:ids, tq:co:pending. These are written straight to the database, not under InstanceName. |
| Request payloads | UTF-8 JSON bytes, GZip-compressed if you turned that on. |
| Seeded cron jobs | InitIdentifier values MemoryTicker_Seeded_{function}, so cron jobs from [TickerFunction] are matched, not duplicated. |
| Function names | Your own strings, so stored jobs still find their functions. |
| Dashboard API and sign-in | HTTP API under api/, SignalR hub at ticker-notification-hub, credentials in the Authorization header (Basic or Bearer) or the access_token query value. No cookies. |
| Configuration | TickerNet reads no configuration section of its own. Cron placeholders such as %Jobs:Cron% use the keys you chose. |
| Metrics | There is no Meter in either code base. |
EF Core migrations
The database needs no change. Your migration files do.
Migrations you generated with TickerQ refer to TickerQ.EntityFrameworkCore.DbContextFactory, typeof(TickerQDbContext) and, in the model snapshot, entity names such as "TickerQ.Utilities.Entities.TimeTickerEntity". Rename those to TickerNet so the files compile and the snapshot matches the new model. The one-pass command in section 02 does this.
Leave every migration ID in [Migration("…")] as it is, even if it says TickerQ. EF Core records applied migrations by ID in __EFMigrationsHistory. A changed ID looks like a new migration, and applying it would try to create tables that already exist.
To check, add a throwaway migration. If its Up() and Down() are empty, the model matches the database and you can remove it. If not, read it before you apply anything.
dotnet ef migrations add CheckTickerNetRename
# Inspect the new file: Up() and Down() should have no operations.
dotnet ef migrations removeComing from TickerQ Hub
Only if you ran jobs on remote workers with TickerQ.RemoteExecutor and TickerQ.SDK.
TickerNet has no hosted hub: the scheduler is the hub. Remote workers covers set-up and behaviour in full, and ADR 0009 records the design.
- Scheduler. Replace
TickerQ.RemoteExecutorwithTickerNet.Hub: callAddTickerNetHubwith a shared secret insideAddTickerNet, andapp.MapTickerNetHub(). The scheduler must accept HTTP/2. - Workers. Replace
TickerQ.SDKwithTickerNet.Worker: callAddTickerNetWorkerwith the scheduler's address, the same shared secret and a node name. Workers connect to the scheduler, not to TickerQ Hub, and need no hub API key.TickerQ.SDKcan't connect to a TickerNet scheduler. - Use the same node names. Stored jobs named
function@noderun on the TickerNet worker whose node name matches, with the same spelling. - Data. No change: the
function@nodenaming rule and theIsSystemPausedcron column work as before. - Code.
SdkOfflineSkipExceptionstill works but is obsolete; useWorkerOfflineException. TheTickerFunctionProviderhooks are kept. - Behaviour. The scheduler, not the worker, now runs retries and records every status. Logs from a function stay in the worker's own logging; they aren't forwarded to the dashboard.
Checklist
- Your app runs on .NET 10 or .NET 11.
- TickerQ package references are replaced with the matching TickerNet packages.
- Namespaces, types and members are renamed, with
TickerQuery…names and migration IDs left alone. TQ0nnsuppressions and severities now sayTN0nn.- EF Core migration files compile, and a check migration comes out empty.
- Redis: you chose to keep or change the
InstanceNameprefix, and changed any"tickerq"keyed-service lookups. - Dashboard: proxy and access rules use the new path, or you set the old one. Old links redirect on their own.
- Tracing listens to
TickerNetwithAddTickerNetSource(). Trace queries and alerts use the new names, or you turned onuseTickerQNames: true. Log searches and log levels use the new names. - If you used TickerQ Hub: the scheduler uses
TickerNet.Hub, workers useTickerNet.Workerwith the same node names and the shared secret, andSdkOfflineSkipExceptionis replaced withWorkerOfflineException. - Code that cancelled a just-added job through the token passed to
AddAsyncnow usesTickerCancellationTokenManager.RequestTickerCancellationById. - All nodes are upgraded in the same deployment.