Upgrade and Migration
The documentation describes the 1.3.x release line. Check every installed @connectum/* version before applying a migration; packages can use different compatible release lines, so verify the complete set rather than inferring it from one package.
npm ls '@connectum/*'pnpm list '@connectum/*'bun pm lsCurrent Release Line
The portal may document the next release line before every package on that line is published. Use the package-specific GitHub releases and the Runtime Compatibility matrix to decide whether an upgrade applies to your installed set.
If you are upgrading from a pre-1.0 or 1.0 installation, review every applicable action below rather than assuming a direct upgrade to the documented line.
Required Actions by Starting Version
| Installed version | Required action |
|---|---|
| 1.2.x | Review the 1.3 release notes for each installed package and run your existing tests, then apply every action in Actions for 1.2.x that matches your code |
| 1.1.x | Review the 1.2 and 1.3 release notes for each installed package and run your existing tests; the 1.3 actions for 1.2.x apply as well |
| 1.0.x | Review package release notes; 1.1 capabilities are additive; the 1.3 actions for 1.2.x apply as well |
| RC or alpha | Follow Migrating to 1.0, then review the Service Catalog migration |
Actions for 1.2.x
Each item applies only if your code or configuration matches it.
- If you pin
@bufbuild/protobufor Connect, follow Peer dependencies on protobuf and Connect. - If you implement your own
ProtocolRegistration, or adefineLazyServicefactory relies on separate instances per transport, follow Custom protocols: setup/register split. - If in-process calls (
localClient,ctx.call) watchcontext.signaland must finish duringserver.stop(), follow In-process calls on shutdown. - If a service with an
eventBusrelied on a message that arrives after the shutdown began still being handled by the stopping instance, follow Event bus stops receiving at the shutdown signal: the bus now stops receiving when the shutdown signal aborts, and such a message is redelivered. - If you use
createLoggerInterceptorand read request or response bodies from its output, follow Logger bodies are opt-in: bodies are no longer logged unless you setincludeBodies: true. - If you use the timeout or retry interceptors, or rely on a late successful response or on one more retry after a timeout or a cancellation, follow Cancellation and Streaming Scope: an expired timeout now aborts
req.signalandctx.signalwithDeadlineExceeded, retry stops on cancellation, and such calls end withDeadlineExceededorCanceled. - If you set
outgoingInterceptorsand also copied the same signer, tracing or retry onto your resolver's transports, follow section 6 of Migrating to the Service Catalog: the chain now runs on every route, so remove the copy. - If a bearer signer sits in
outgoingInterceptorsand the resolver also reaches targets in another trust domain, the same section applies: the signer now runs on those targets too, so restrict it byreq.service.typeName. - If you use
@connectum/events-amqp, follow events-amqp 1.3 behavior changes:onDisconnectednow fires once per drop (disconnect counters drop, roughly by half), you must subscribe again afterconnect()once recovery has given up, and a finitemaxRetriesmakes the initial connect reject withAmqpConnectionError(original error incause) instead of the raw error. - If your issuer mints signed tokens without an
expclaim, follow Signed tokens must carryexp:createJwtAuthInterceptorandsignedTokenTrustnow reject them unless you setrequireExpiration: false. - If a dashboard, alert or code uses
rpc.system,rpc.service,rpc.connect_rpc.status_codeor their constants from@connectum/otel, follow RPC telemetry attribute names: they are nowrpc.system.name, a fully qualifiedrpc.methodandrpc.response.status_code, and a successful span now has an unset status instead ofOK(queries that selectstatus = okmust select "status is not error"). - If you pass
kafkaConfigor a numericcompressiontoKafkaAdapter(), follow Kafka adapter options: use the typed options andclientOptions. - If a client reads the text of an error that a handler raised as a plain
Error, a thrown string or an object with a numericcode, follow Error handler keeps non-Connect messages on the server: the client now receivesinternal error(or an empty text when the error carries a numericcodefrom 1 to 16 other thanInternal, or for an abort) unless you setexposeErrorMessages: true. - If you use
@connectum/authwith a misspelled protopolicyordefault_policy, a method that is bothpublicandinternal,signedTokenTrustissuers that rely onsuborscope,skipMethods: ['*'],propagateHeaderswith identities that contain line breaks or characters above U+00FF, or a cachettlormaxSizethat is not finite or below 1, follow Auth option validation: each of these now fails loudly. - If you pass
httpPathstoHealthcheck(), follow HTTP health options are validated: an empty list ([]), a non-string entry, an entry without a leading/, or one containing?or#now throws at startup; to turn the HTTP endpoint off sethttpEnabled: false. - If you pass
watchIntervalother than an integer from 1 to 2147483647,nullor a non-boolean option toHealthcheck(), registerHealthcheck()twice in one server, or pass a status other than the fourServingStatusvalues to the health manager, follow Healthcheck option checks: each of these now throws, andHealth.Watchnow delivers every status change instead of the states a poll caught. - If you pass a fractional number or a delay above 2147483647 ms to the timeout, bulkhead, circuit breaker or retry interceptors,
fallback: trueornulltocreateDefaultInterceptors(), orfallbacktoconnectum init --resilience, an unknown key tocreateDefaultInterceptors(),nullor a value of the wrong type for an option of an interceptor factory, or a method filter key that can never match (such as/UnaryorSvc/Un*), follow Interceptor option validation: these now throw when the chain is built; the same page notes that the logger'sskipHealthChecknow skips only thegrpc.healthpackage. - If your tests use the descriptor mocks of
@connectum/test-fixturesor@connectum/testing(createMockDescMessage,createMockDescField,createMockDescMethod,createFakeMethod,createMockNextSlow), follow Test fixture descriptors follow protobuf-es:create(mock)now returns zeroed fields, a snake_case name gives a camelCaselocalName, and a repeated field number throws; the same page covers the helpers that now throw instead of building something else (an unknown scalartype, a field number outside the protobuf range, an unknown method kind, a secondregisterof one name, a delay that is negative,NaNor above 2147483647 increateMockNextSloworcreateMockStream). - If your code reads the request type of a regenerated service catalog (
ConnectumCallMap,ConnectumStreamMap) as a full message, follow section 3 of Migrating to the Service Catalog: the request slot is nowMessageInitShape<typeof RequestSchema>, so takeMessageShape<typeof RequestSchema>from the schema or normalize withcreate(RequestSchema, request). - If you use
@connectum/events-rediswith abrokerOptions.maxLen,blockMsorcountthat is not a whole number in range (maxLen: 0included), or with a server that needs longer thanredisOptions.connectTimeoutto become ready, follow Redis adapter options:RedisAdapter()now throws for such an option andconnect()rejects after the timeout. - If you pass
KafkaAdapter()an empty or non-arraybrokers, an emptyclientId, asessionTimeoutof 3000 ms or less, an invalidretryor an unknownsasl.mechanism, follow Kafka adapter validation: the constructor now throws. - If you pass a
topologyModeother than the exactassert,checkorskip, anexchangeTypeoutside the four types, aconsumerOptions.prefetchoutside 0 to 65535, aqueueOptions.messageTtlormaxLengththat is negative or fractional, ajitteroutside 0 to 1, or arecoveryorpublishRetrythat is neither a boolean nor an object, follow events-amqp option validation: each of these now throws whenAmqpAdapter()is called, and a table header from an external publisher now arrives as JSON. - If you use
@connectum/authand your gateway clients sendx-auth-*headers that a handler reads, averifyCredentialsormapSessioncallback can returnnullor a partial object, a verifier grants a scope that contains a space whilepropagateHeadersis on, or identities near the header limits (subject 512, type 128, name 256, roles, scopes or claims 8192 characters) are propagated, or yourtrustSourcelists a CIDR block, follow Auth identity handling: the gateway interceptor now deletes everyx-auth-*header and refuses CIDR blocks withoutallowCallerControlledCidr, such results areUnauthenticated, an identity that does not fit its headers is refused instead of cut, non-Latin text is encoded, and each request gets its own copy of the cached identity. - If you pass an empty
servers, anackWaitof 0 or below, amaxDeliverof 0, below -1 or fractional, or an unknowndeliverPolicytoNatsAdapter(), follow NATS adapter options: these now throw when the adapter is created. - If you use
@connectum/authwith adefaultPolicyor ruleeffectthat is not exactlyallowordeny, anauthorizecallback that returns a truthy value other thantrue, aninternalproto method reached withoutcreateInternalAuthInterceptor, JWTs with an empty or non-stringsub, an emptyissueroraudienceormaxTokenAge: 0, method patterns such asService/Write*, an unset gateway secret or client token, follow Auth authorization and JWT validation: each of these now fails loudly when the interceptor is created or denies the call. - If a client treats the end of a server stream as complete, follow Streams cut by stop(): a stream cut by
stop()now ends withunavailable. - If you enable
fallbacktogether withretryorcircuitBreakerincreateDefaultInterceptors(), follow Fallback stands outside retry and circuit breaker: retries now run before the fallback value is served and the breaker now opens. - If you enable
fallbackincreateDefaultInterceptors()or itshandlerreturns a plain object or any value that is not the response message, follow Fallback: validation order and handler result: a request that fails validation is no longer answered by the fallback value, and ahandlerresult that is not a response message now fails with aTypeError. - If code matches
Unavailableon actx.callto a service that is not mounted on a server without aremoteResolver, or your catalog configuration holds mistakes that used to be accepted (a non-positivetimeoutMs, an invalidpropagateHeadersname, anenabledServicesentry with no matching service, a catalog key that differs from itstypeName, the same service defined twice), follow Service catalog checks. - If you pass
handlerTimeoutof0or a fraction, adrainTimeoutthat isNaN, negative or above 2147483647 ms, aretrydelay ormultiplieroutside the documented range, an unknownretry.backoff, or adlqwithout a non-emptytopic, or if you countdlq.error=AbortErrorevents on shutdown, follow Event bus option checks: these now throw when the bus or the middleware is created, a stop returns an event that waits between retries to the broker instead of dead-lettering it, and a failed dead-letter publish reaches theobserver. - If a script passes the
connectumCLI a flag it does not define, runsinit --runtime bun --node-exec ..., runsgenerate serviceoutside a project (or--with-eventswithout@connectum/events), or generates the service catalog withouttarget=tsor withoutput_filetwice, follow CLI and catalog plugin input is checked: each of these now fails with a message instead of being accepted silently. - If a test reaches a
createTestServer()server from another container or host, passes it services, interceptors or protocols of the wrong type, or reads earlier exports from a laterInMemoryMetricCollector.flush(), follow Testing helper changes: the test server listens on127.0.0.1(passhost: '0.0.0.0'), wrong types no longer compile and are rejected at runtime, andflush()returns only new data. - If you set
GRACEFUL_SHUTDOWN_TIMEOUT_MSempty or fractional, you depend on a failed shutdown hook skipping its dependents, or you callstop()or send a signal whilestart()is running, follow Shutdown behavior changes: every shutdown hook now runs andstop()waits for all of them. - If a handler calls
send()on actx.stream()handle afterclose(), follow section 8 of Migrating to the Service Catalog: it now throwsFailedPreconditioninstead of dropping the message. - If your server is created without
readMaxBytes, expect one warning at startup and set the option as described in When no limit is set: the default limit is unchanged.
Focused Migrations
- Migrating to 1.0 — Node.js floor, explicit resilience, streaming transport validation, and removed EventBus
syncoption. - Migrating to the Service Catalog — replace legacy service registration and manual client routing.
- Custom protocols: setup/register split — move one-time work of your own
ProtocolRegistrationintosetup(context), and reviewdefineLazyServicefactories that relied on one instance per transport (1.3; other applications using only built-in protocols need no changes). - Peer dependencies on protobuf and Connect — keep
@bufbuild/protobuf,@connectrpc/connectand@connectrpc/connect-nodepins inside the peer ranges (1.3; breaking for out-of-range pins). - Erasable proto enums — generate proto enums as
as constobjects (erasable_syntax=true) and update code that used enum reverse mapping; only for projects whose protos declare enums. - Signed tokens must carry
exp— from 1.3,createJwtAuthInterceptorandsignedTokenTrustreject a signed token that has noexpclaim unless you setrequireExpiration: false(breaking for issuers that mint tokens withoutexp). - RPC telemetry attribute names — from 1.3,
@connectum/otelnames span and metric attributesrpc.system.name, a fully qualifiedrpc.methodandrpc.response.status_codeinstead ofrpc.system,rpc.serviceandrpc.connect_rpc.status_code(breaking for dashboards, alerts and code that use the old names or constants). From 1.3, spans also end with an unset status on success instead ofOK(breaking for queries that selectstatus = ok); the guide covers both changes. - Redis adapter options — from 1.3,
RedisAdapter()throws aRangeErrorfor amaxLen,blockMsorcountthat is not a whole number in range (maxLen: 0used to delete every published event),connect()andsubscribe()reject afterconnectTimeoutwhen the server accepts the connection and never answers, and a consumer group lost by Redis is re-created (breaking for services that pass invalidbrokerOptionsor need longer thanconnectTimeoutto become ready). - Kafka adapter options — from 1.3,
@connectum/events-kafkahas its own option types:kafkaConfigis replaced by top-levelssl,sasl, timeouts,retryandlogLevelplusclientOptions, andcompressionis a name (breaking for services that passkafkaConfigor a numericcompression). - Kafka adapter validation — from 1.3,
KafkaAdapter()throws for an empty or non-arraybrokers, an emptyclientId, asessionTimeoutthat is not above 3000 ms, an invalidretryand an unknownsasl.mechanism(breaking for services that pass such options). - Testing helper changes — from 1.3,
createTestServer()listens on127.0.0.1(passhost: '0.0.0.0'to reach it from another container or host) and rejects services, interceptors and protocols of the wrong type,InMemoryMetricCollector.flush()returns only what was recorded since the previous flush, and the default parity comparison ignores protocol headers and the measured time of duration histograms (breaking for tests that rely on the old listening address or on a cumulativeflush()). - In-process calls on shutdown — from 1.3,
server.stop()abortscontext.signalof in-flight in-process calls exactly like HTTP calls. - Streams cut by stop() — from 1.3, a server stream cut by
server.stop()ends withunavailableinstead of a normal end. - Service catalog checks — from 1.3,
ctx.callto an unmounted service on a server with noremoteResolverfails withFailedPreconditioninstead ofUnavailable(breaking for code that matchedUnavailable), and catalog calls and catalog configuration refuse mistakes that used to be accepted. - Shutdown behavior changes — from 1.3, shutdown hooks run to completion when one fails,
GRACEFUL_SHUTDOWN_TIMEOUT_MSrejects empty and fractional values, andstop()and signals duringstart()are honoured. - Event bus stops receiving at the shutdown signal — from 1.3, the bus ends its subscriptions when the shutdown signal aborts, and a message that arrives before the bus hook runs is redelivered instead of handled with a cancelled
ctx.signal. - Event bus option checks — from 1.3,
createEventBus,retryMiddlewareanddlqMiddlewarethrow for timeout, retry delay and dead-letter topic values that used to be accepted and break deliveries (breaking for those values only), a failed dead-letter publish reaches theobserver, and a stop returns an event that waits between retries to the broker instead of dead-lettering it. - Logger bodies are opt-in — from 1.3,
createLoggerInterceptorpasses request and response bodies to the log sink only withincludeBodies: true(breaking for anything that reads bodies from the log). - Error handler keeps non-Connect messages on the server — from 1.3,
errorHandlersendsinternal error(or an empty text for an error with a numericcodeother thanInternal, or for an abort) instead of the text of an exception that is not aConnectErrororSanitizableError, unlessexposeErrorMessages: true(breaking for clients that read that text). - Option descriptors from the packages — from 1.3, generated code can import the auth and events option descriptors from
@connectum/auth/@connectum/eventsinstead of generating local copies; optional, for projects scaffolded with--author--eventsbefore 1.3. - events-amqp 1.3 behavior changes — single
disconnectedper drop, re-subscribing after recovery gives up, typed initial-connect failure,recovery: falseclose reporting, isolated lifecycle callbacks, and theamqplib2.2.0 minimum (1.3; for@connectum/events-amqpusers). - events-amqp option validation — from 1.3,
AmqpAdapter()rejects an unknowntopologyModeorexchangeType, an out-of-rangeprefetch,messageTtl,maxLengthorjitterand other unusable options at creation; table headers arrive as JSON; an invalid publish argument is no longer retried (for@connectum/events-amqpusers). - CLI and catalog plugin input is checked — from 1.3,
connectumrefuses unknown flags,--node-execwith Bun, andgenerate serviceoutside a project;protoc-gen-connectum-catalogrefuses anytargetbuttsand a repeatedoutput_file(breaking for scripts that relied on the old silent acceptance). - Auth option validation — from 1.3,
@connectum/auththrows on a misspelled proto policy, on a method that is bothpublicandinternal, onskipMethods: ['*']and on unusable cache bounds; rejects an identity with NUL, CR, LF or a character above U+00FF whenpropagateHeadersis on; andsignedTokenTrustidentifies callers by their verified issuer (breaking for those configurations). - Auth authorization and JWT validation — from 1.3,
@connectum/auththrows on adefaultPolicyor ruleeffectthat is notallowordeny, on method patterns that cannot match, on an empty JWTissueroraudienceand on unusable gateway, internal, generic and client options; theauthorizecallback allows only on exactlytrue; JWTs need a non-empty string subject; and aninternalproto method is open only to an identity fromcreateInternalAuthInterceptor(breaking for those configurations). - HTTP health options are validated — from 1.3,
Healthcheck()throws on an empty or malformedhttpPathsinstead of serving nothing, and/healthz?service=<name>no longer depends on theHostheader (breaking forhttpPaths: []; usehttpEnabled: false). - Healthcheck option checks — from 1.3,
Healthcheck()throws on an unusablewatchInterval, anulloptions object, a badmanagerorhttpEnabled, and on a second registration in one server; the manager refuses statuses other than the fourServingStatusvalues;createHttpHealthHandlervalidates its paths;Health.Watchdelivers every change (breaking for configurations that relied on the old silent acceptance). - Interceptor option validation — from 1.3, the numeric options of the timeout, bulkhead, circuit breaker and retry interceptors must be integers (delays at most 2147483647 ms),
createDefaultInterceptors()refusesfallback: true,nulland other non-object values with aTypeError, andconnectum init --resilienceno longer offersfallback(breaking for configurations that passed such values). - Fallback stands outside retry and circuit breaker — from 1.3,
createDefaultInterceptors()places the fallback in front of retry and the circuit breaker: retries run, the breaker opens, and the fallback value is served after both (breaking result for chains that combinedfallbackwithretryorcircuitBreaker). - Test fixture descriptors follow protobuf-es — from 1.3, the descriptor mocks of
@connectum/test-fixturesand@connectum/testingzero-initialise fields increate(), derivelocalNamefrom the proto name, number fields uniquely (a repeated number throws), escape reserved names with$, link fields to their message throughparent, report the proto3 edition and mark sensitive fields with a realFieldOptions, andcreateMockNextSlowreturns copies (breaking for tests that rely on the old mock behavior). - Auth identity handling — from 1.3,
createGatewayAuthInterceptordeletes every standardx-auth-*header, averifyCredentialsormapSessionresult that is not a completeAuthContextisUnauthenticated, a scope that contains a space is rejected whenpropagateHeadersis on, CIDR blocks intrustSourceneedallowCallerControlledCidr, an identity that does not fit its headers is refused instead of cut, non-Latin text is encoded, and each request gets its own copy of the cached identity (breaking for code that relied on any of these). - OpenTelemetry configuration — from 1.3,
@connectum/otelignores a wrongOTEL_*exporter, protocol or endpoint value with aCONNECTUM_OTEL_INVALID_ENVprocess warning instead of failing every RPC, decodesOTEL_RESOURCE_ATTRIBUTESas percent-encoded, rejects a misspelledinitProvidersettingsvalue withTypeError, and makes a concurrentshutdownProvider()wait for the flush (behaviour change for code that relied on the exception, on a literal%, or on the second call returning at once). - NATS adapter options — from 1.3,
NatsAdapter()throws at creation for an emptyservers,ackWaitof 0 or below,maxDeliverof 0, below -1 or fractional, and an unknowndeliverPolicy(breaking for configurations that passed one of these), and publish metadata withx-*keys and empty values reaches the handler. sensitive fields with a realFieldOptions, andcreateMockNextandcreateMockNextSlowreturn copies at every depth. The fixtures also throw on an unknown scalartype, a field number outside the protobuf range, an unknown method kind, a repeatedregisterand an unusable delay, andcreateMockFnrecords thethis, result and error of each call (breaking for tests that rely on the old mock behavior).
Release History
Full release narratives, pull requests, and package-specific dependency updates belong in Connectum GitHub releases and package changelogs. This page keeps only information needed to decide and complete an upgrade.
Legacy Anchors
The following aliases preserve links published by the former combined changelog. They now route readers to the focused migration or public release history.
Continue with Migrating to 1.0 for required changes or the release history for non-actionable detail.