Skip to content

feat: ingest iOS push notifications via FCM Kafka topics - #86

Merged
code-lucasgabriel merged 1 commit into
feat/migration-apns-to-fcmfrom
feat/ios-via-fcm-kafka-ingestion
Apr 29, 2026
Merged

feat: ingest iOS push notifications via FCM Kafka topics#86
code-lucasgabriel merged 1 commit into
feat/migration-apns-to-fcmfrom
feat/ios-via-fcm-kafka-ingestion

Conversation

@code-lucasgabriel

@code-lucasgabriel code-lucasgabriel commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Add ingestion for the new push-_ios-(single|massive) topics so the GCM pusher can consume iOS messages alongside the existing Android ones.

  • Extend topic regex in config and common.go to match the ios platform
  • Add Platform field to KafkaMessage and populate it from the topic
  • Subscribe pusher gcm to ios single/massive topics for every gcm app
  • Cover new parsing and consumer behavior with unit tests

Note

Medium Risk
Adds a new field to the KafkaMessage struct and changes topic subscription/parsing, which can break downstream consumers or alter which Kafka topics are consumed if assumptions were implicit.

Overview
Enables ingestion of new push-<game>_ios-(single|massive) Kafka topics alongside existing gcm/apns topics by expanding the configured topic regexes and the GetGameAndPlatformFromTopic parser to recognize ios.

Propagates the parsed platform through the queue pipeline by adding Platform to interfaces.KafkaMessage, populating it in KafkaConsumer.receiveMessage, and updating GCMPusher to subscribe to both gcm and ios topics per app. Adds unit tests covering topic parsing and the new Game/Platform fields on consumed messages.

Reviewed by Cursor Bugbot for commit d78859e. Bugbot is set up for automated code reviews on this repo. Configure here.

Add ingestion for the new push-<game>_ios-(single|massive) topics so
the GCM pusher can consume iOS messages alongside the existing Android
ones.

- Extend topic regex in config and common.go to match the ios platform
- Add Platform field to KafkaMessage and populate it from the topic
- Subscribe pusher gcm to ios single/massive topics for every gcm app
- Cover new parsing and consumer behavior with unit tests

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d78859e. Configure here.

Game: parsed.Game,
Platform: parsed.Platform,
Topic: *topicPartition.Topic,
Value: value,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS messages misreported as "gcm" in stats and operations

High Severity

The new Platform field on KafkaMessage is correctly populated (e.g., "ios" for iOS topics) but is never read by the firebase messageHandler. That handler hardcodes "gcm" in all ~10 call sites for stats reporting, feedback, dedup, and rate limiting. iOS notifications ingested via the new topics will be mislabeled as "gcm" everywhere — breaking per-platform metrics, sharing dedup keys and rate-limit buckets across platforms.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d78859e. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of the incremental development of the feature. Carry the platform value end-to-end through the Firebase message handler so that dedup, rate limiting, stats reporters, and feedback reporters use the actual platform (gcm or ios) instead of the hardcoded "gcm" string, is the next task in the development.

@code-lucasgabriel
code-lucasgabriel merged commit 92c5687 into feat/migration-apns-to-fcm Apr 29, 2026
3 checks passed
@code-lucasgabriel
code-lucasgabriel deleted the feat/ios-via-fcm-kafka-ingestion branch April 29, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant