diff --git a/local/pubsub/topics.txt b/local/pubsub/topics.txt new file mode 100644 index 0000000..86fde58 --- /dev/null +++ b/local/pubsub/topics.txt @@ -0,0 +1,42 @@ +# topic [subscription] - one per line; created in the Pub/Sub emulator before services start +activate-member-topic activate-member-subscription +backoffice-topic backoffice-subscription +batch-transfer-member-topic batch-transfer-member-subscription +camunda-new-registration-topic camunda-new-registration-subscription +create-merchant-sales-topic create-merchant-sales-subscription +create-stockist-branch-topic create-stockist-branch-subscription +email-save-request-topic email-save-request-subscription +email-topic email-subscription +error-log-topic error-log-subscription +event-attendance-topic event-attendance-subscription +exist-member-jumio-success-topic exist-member-jumio-success-subscription +extend-member-expiry-topic extend-member-expiry-subscription +generate-credit-note-doc-topic generate-credit-note-doc-subscription +generate-order-doc-topic generate-order-doc-subscription +indo-member-jumio-success-topic indo-member-jumio-success-subscription +indo-member-remain-my-topic indo-member-remain-my-subscription +kyc-jumio-topic kyc-jumio-subscription +member-topic member-subscription +new-member-add-user-topic new-member-add-user-subscription +new-member-topic new-member-subscription +new-preferred-customer-add-user-topic new-preferred-customer-add-user-subscription +new-reg-order-topic new-reg-order-subscription +new-stockist-add-user-topic new-stockist-add-user-subscription +order-paid-topic order-paid-subscription +response-time-log-topic response-time-log-subscription +sms-topic sms-subscription +transfer-member-migrate-sales-topic transfer-member-migrate-sales-subscription +update-branch-warehouse-topic update-branch-warehouse-subscription +update-promotion-code-topic update-promotion-code-subscription +update-sync-topic update-sync-member-subscription +update-sync-topic update-sync-system-subscription +voucher-update-invoice-topic voucher-update-invoice-topic +create-branch-warehouse-topic +inventory-remark-update-topic +save-consignment-trxn-topic +save-sales-submission-trxn-topic +tastefully-rewards-topic +transfer-member-wallet-topic +update-stockist-branch-topic +update-stockist-sales-inventory-topic +wallet-update-invoice-topic diff --git a/openspec/changes/add-repo-foundation-local-stack/tasks.md b/openspec/changes/add-repo-foundation-local-stack/tasks.md index 5b1d841..22c1902 100644 --- a/openspec/changes/add-repo-foundation-local-stack/tasks.md +++ b/openspec/changes/add-repo-foundation-local-stack/tasks.md @@ -16,7 +16,7 @@ Run serially: every group touches build files or shared config. ## 3. Local stack (without seed) -- [ ] 3.1 Extract every Pub/Sub topic and subscription name used by the kept modules: read each `PubSubConfig`, `PubSubListener` and publisher call, and resolve property values. Write them to `local/pubsub/topics.txt` as `topic subscription` lines, plus publish-only topics as `topic` lines. Verify: the line count of subscriptions equals the number of `PubSubInboundChannelAdapter` constructions in the kept modules (37). +- [x] 3.1 Extract every Pub/Sub topic and subscription name used by the kept modules: read each `PubSubConfig`, `PubSubListener` and publisher call, and resolve property values. Write them to `local/pubsub/topics.txt` as `topic subscription` lines, plus publish-only topics as `topic` lines. Verify: every `@Value("${pubsub...}")` key in the kept modules resolves to a name (none unresolved). Result: 32 unique subscriptions plus 9 publish-only topics. There are fewer than the 37 adapter constructions because Tastefully shares some subscription names across services (e.g. `new-member-add-user-subscription` in system, counter and member). This is kept as-is. - [ ] 3.2 Add `application-local.yml` to each kept Spring module with the emulator host and `co-lite-local` project id. Verify: `mvn -T 1C verify` still passes. - [ ] 3.3 Add `local/docker-compose.yml`: mysql:8, redis:7, the Pub/Sub emulator, a pubsub-init one-shot that reads `topics.txt`, and the eight Java services named as in design decision 4, each with `JAVA_OPTS=-Xmx384m`. Add `local/.env.example` with dev-only values for every env var listed in design Context, and git-ignore `local/.env`. Add `local/up.sh`, which runs `mvn -T 1C -DskipTests package` then `docker compose up -d --build`. Verify: with an empty MySQL (schemas created empty by an init script), `local/up.sh` brings pubsub-init to exit 0, and no service log shows a missing topic or subscription error.