GatewayConfiguration (Kafka topic)
Kafka topic for the GatewayConfiguration aggregate of CNA Pay - which subaccount at which payment vendor serves a recipient in a capture channel. Carries GatewayConfigurationActivated, owned by PAY and recorded by cna-pay in its outbox in the transaction of the activation. Keyed by the configuration id. No consumer yet.
The name of GatewayConfigurationActivated is decided; its aggregate root, key, version and fields are provisional, chosen by the Pay engineering until cna-pay-docs decides how the events of cna-pay reach this catalog (cna-br/cna-pay#343). If the catalog puts the configuration on the Recipient topic, the root becomes Recipient and the key recipientId.
Overview
GatewayConfiguration is the verbatim AggregateRoot of the gateway configuration event definitions owned by PayPayDomainv1.0.0Payments platform bounded context of the CNA network. Owns the PAY message contracts for the recipients that receive mon...Ownercna-platformMapView docs. A gateway configuration says which subaccount, at which payment vendor, serves a RecipientRecipientEntityv1.0.0A recipient (recebedor) of CNA Pay - every CPF or CNPJ enabled to receive money on the platform - a school, the franchis...Ownercna-platformView docs in a capture channel, with the payment methods it takes. CNA PayCNA PayServicev1.0.0Payments platform of the CNA network (recipients, their subaccounts at the payment vendor, bank accounts and gateway con...PublishesRecipientCreated, RecipientStateChanged +5Ownercna-platformMapRepoView docs records Gateway Configuration ActivatedGateway Configuration ActivatedEventv1.0.0A gateway configuration of a recipient became active, born active or activated once the vendor returned the subaccount: ...Ownercna-platformSchemaMapView docs in its outbox, in the transaction in which a configuration becomes ACTIVE, and a separate publisher process sends it here. The closing of a configuration (GatewayConfigurationClosed) happens only in a cutover, which is not in this delivery, so it is not defined yet.
A version of its own. The configuration is an aggregate of its own: its objectVersion counts the changes of the configuration, apart from the version of the recipient on Recipient (Kafka topic)Recipient (Kafka topic)Channelv1.0.0Kafka topic for the Recipient aggregate of CNA Pay - every CPF or CNPJ enabled to receive money on the platform. Carries...Ownercna-platformView docs. A consumer that needs the order of a configuration and of its recipient correlates them by recipientId.
At least once. As on Recipient (Kafka topic)Recipient (Kafka topic)Channelv1.0.0Kafka topic for the Recipient aggregate of CNA Pay - every CPF or CNPJ enabled to receive money on the platform. Carries...Ownercna-platformView docs, the publisher sends the payload the outbox kept, byte for byte, in an envelope it builds at each round, in the recording order of each configuration, and may send an event again, with the same payload and eventId and a new metadata.producedAt. A consumer drops an event whose eventId it already applied, and a state older than the objectVersion it holds for that configuration.
Who receives it. The facts of a configuration go to the master system of its recipient (cna-pay-docs RN-EVT-155), the One in this delivery. The topic is the aggregate root, as for every topic of the catalog; a topic per client system (cna-pay-docs RN-EVT-200) waits for the catalog team (cna-br/cna-pay#104).
Nothing is published yet. cna-pay keeps these facts in its outbox and publishes none until its message is in this catalog (cna-pay-docs, Eventos, “Caminho dos eventos até o CNA Event Catalog”): the deployed cna-pay runs the API alone, without its publisher. Outside staging and production the publisher asks the broker to create a missing topic; the staging and production topics are provisioned.
Nothing consumes the topic yet. The expected first consumer is CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations, receivabl...PublishesGrantApplicationAccess, EmployeeCreated +19SubscribesInviteUser, FranchiseCreated +17Ownercna-platformMapRepoView docs, which configures the gateway of its schools.
Message key
Messages are keyed on payload.id, the id of the gateway configuration in cna-pay (RoutingKey returns ID.String()), so the events of one configuration land on one partition and keep their order. The facts of the recipient ride Recipient (Kafka topic)Recipient (Kafka topic)Channelv1.0.0Kafka topic for the Recipient aggregate of CNA Pay - every CPF or CNPJ enabled to receive money on the platform. Carries...Ownercna-platformView docs, keyed by the recipient id, so nothing orders a fact of a configuration against a fact of its recipient.
Envelope
Every message on every CNA topic uses the same envelope. schema.json on each message page describes payload only.
{ "payload": { "eventId": "0199c4a0-6f3e-7b21-9a4d-5e8f0c1d2b3a", "objectVersion": 1, "id": "019a6a20-1c2d-7e3f-8a4b-5c6d7e8f9a0b", "...": "see the schema on each message page" }, "metadata": { "event": "GatewayConfigurationActivated", "producedAt": "2026-11-18T12:00:00.000Z", "owner": "PAY", "producedBy": "PAY", "version": "1.0.0" }}owner is the contract owner from the definition; producedBy is the application that emitted the message (see The envelope in docs/modelling/02-mapping.md). Today. cna-pay sets owner from the definition (PAY), always sends producedBy: PAY, and also sends the contract version in metadata, as cna-one does. eventId and objectVersion travel in the payload, so the envelope stays the one every application shares.
Channel information
GatewayConfiguration- kafka
Custom properties
| Property | Value |
|---|---|
| Message Keyx-message-key | id |
| Aggregate Rootx-aggregate-root | GatewayConfiguration |