Skip to content

🌟 Feature : FCM μ•Œλ¦Ό 초기 μ„ΈνŒ…#207

Open
pjs1710 wants to merge 26 commits into
devfrom
REQ_026
Open

🌟 Feature : FCM μ•Œλ¦Ό 초기 μ„ΈνŒ…#207
pjs1710 wants to merge 26 commits into
devfrom
REQ_026

Conversation

@pjs1710
Copy link
Copy Markdown
Contributor

@pjs1710 pjs1710 commented Nov 11, 2025

πŸ€ 이슈 번호


βœ… μž‘μ—… 사항

1️⃣ FCM 토큰 Mapping

κ°€μƒμ˜ FCM 더미 토큰을 μ΄μš©ν•˜μ—¬ memberId와 token을 λ§€ν•‘ν•˜λŠ” μž‘μ—… μ§„ν–‰.

ν•΄λ‹Ή FCM 더미 토큰 뢀뢄은 FEμ—μ„œ EAS λΉŒλ“œ ν›„μ˜ ν™˜κ²½μ—μ„œ Firebase에 토큰을 λ°›μ•„μ˜¨ ν›„, ν•΄λ‹Ή 토큰을 λ°›λŠ” μž‘μ—…μ΄ ν•„μš”ν•©λ‹ˆλ‹€.

μœ„μ˜ 참쑰에 ν•΄λ‹Ήν•˜λŠ” μ—”λ“œν¬μΈνŠΈλŠ” POST λ°©μ‹μ˜ ~/api/fcm/register/token으둜, ν•΄λ‹Ή μ—”λ“œν¬μΈνŠΈλ‘œ FEμ—μ„œ 토큰과 둜그인 ν•œ μœ μ €μ˜ memberIdλ₯Ό λ³΄λ‚΄μ£Όκ²Œλ˜λ©΄ μ •μƒμ μœΌλ‘œ 토큰이 등둝이 λ©λ‹ˆλ‹€.


[등둝 μš”μ²­]
image

[Redis 등둝 상황]
image

2️⃣ FCM μ•Œλ¦Ό 전솑/μ‚­μ œ

λ§€ν•‘λœ FCM 토큰은 Redis에 μ €μž₯ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

β“μ™œ Redis에 μ €μž₯ν•˜μ˜€λŠ”κ°€?

β†’ 토큰을 μ €μž₯ 및 κ°€μ Έμ˜€λŠ” 방식에 μžˆμ–΄μ„œ RDBλ₯Ό μ‚¬μš©ν•˜κΈ°μ—λŠ” λ©”λͺ¨λ¦¬ μž‘μ—… λΉ„μš©μ΄ 클 κ²ƒμœΌλ‘œ μ˜ˆμƒλ˜μ–΄ Redisλ₯Ό μ΄μš©ν•΄ μ €μž₯ν•˜κ³  κ°€μ Έμ˜€λŠ” 방식을 μ±„νƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.

β†’ λ˜ν•œ μ•Œλ¦Όμ˜ 경우 동일 토큰에 λŒ€ν•΄ 반볡적인 μš”μ²­μ΄ 잦기 λ•Œλ¬Έμ—, μΊμ‹œλ₯Ό μ΄μš©ν•œ 데이터 μ‘°νšŒκ°€ ν•„μš”ν•©λ‹ˆλ‹€. 이에 μ μ ˆν•œ λ°μ΄ν„°λ² μ΄μŠ€ μ €μž₯ 방식인 Redisλ₯Ό μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€.

λ§€ν•‘λœ 토큰과 FCM 곡식 Documentλ₯Ό μ°Έκ³ ν•˜μ—¬ μ •ν˜•ν™”λœ Json 데이터 ν˜•μ‹μ„ 따라 μ•Œλ¦Όμ„ μ „μ†‘ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

μ°Έκ³  κ³΅μ‹λ¬Έμ„œ : https://firebase.google.com/docs/cloud-messaging/send-message?hl=ko#customize-messages-across-platforms

λ˜ν•œ ν˜„μž¬ 더미 FCM 토큰 데이터λ₯Ό PostMan으둜 μ „μ†‘ν•˜μ—¬ μ•Œλ¦Όμ„ λ°œμ†‘ν•˜κ²Œ 되면 Firebaseμ—μ„œ μ˜¬λ°”λ₯Έ Token ν˜•μ‹μ΄ μ•„λ‹ˆλΌλŠ” 였λ₯˜λ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€. ν•΄λ‹Ή 뢀뢄은 1️⃣에 ν•΄λ‹Ήν•˜λŠ” 참쑰에 ν•΄λ‹Ήν•˜λŠ” 였λ₯˜λ‘œ, ν•΄λ‹Ή λ‚΄μš©μ„ μ°Έκ³ ν•˜μ‹œλ©΄ λ©λ‹ˆλ‹€.


[FCM μ„œλ²„μ— μ•Œλ¦Ό 전솑 μš”μ²­]
image

[BE μ„œλ²„ μ•Œλ¦Ό 전솑 μš”μ²­ 둜그]

2025-11-12 04:15:40 [http-nio-9000-exec-5] INFO  c.m.s.d.n.business.FcmManager - | ==== μ•Œλ¦Ό 전솑 μ‹œμž‘ ==== | memberId : 5d9d8b47-1a82-4381-a5e8-f1bc06332759, title : ν…ŒμŠ€νŠΈ μ•Œλ¦Ό μ „μ†‘μž…λ‹ˆλ‹€, body : μ•ˆλ…•ν•˜μ„Έμš” ν…ŒμŠ€νŠΈ μ „μ†‘μž…λ‹ˆλ‹€
2025-11-12 04:15:41 [http-nio-9000-exec-5] ERROR c.m.s.d.n.helper.FcmUtilImpl - FCM λ©”μ„Έμ§€ 전솑 μ‹€νŒ¨ : The registration token is not a valid FCM registration token
com.google.firebase.messaging.FirebaseMessagingException: The registration token is not a valid FCM registration token

[μ˜¬λ°”λ₯Έ ν˜•μ‹μ˜ Token ν•„μš”]

Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
POST https://fcm.googleapis.com/v1/projects/shoot-pointer-project/messages:send
{
  "error": {
    "code": 400,
    "message": "The registration token is not a valid FCM registration token",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
        "errorCode": "INVALID_ARGUMENT"
      }
    ]
  }
}

⌨ 기타

@tkv00 λ‹˜κ»˜μ„œλŠ” ν˜„μž¬ μ•Œλ¦Ό 전솑 μ‹€νŒ¨μ— λŒ€ν•œ PR이 FEμ—μ„œμ˜ λΉŒλ“œ ν›„ 토큰 전솑에 λŒ€ν•œ ν”„λ‘œμ„ΈμŠ€κ°€ μΆ”ν›„ 진행될 μ˜ˆμ •μž„μ„ μΈμ§€ν•΄μ£Όμ‹œλ©΄ 될 것 κ°™μŠ΅λ‹ˆλ‹€.

λ˜ν•œ 각 μ•Œλ¦Ό 이벀트 λ°œμƒ(ν•˜μ΄λΌμ΄νŠΈ 생성 μ™„λ£Œ, λž­ν‚Ή κ°±μ‹  λ“±)에 λŒ€ν•œ κΈ°λŠ₯ κ΅¬ν˜„μ€ λ‹€μŒ μ΄μŠˆμ—μ„œ λ‹€λ£¨κ² μŠ΅λ‹ˆλ‹€.

@pjs1710 pjs1710 added the ✨ Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€, κΈ°μ‘΄ κΈ°λŠ₯을 μš”κ΅¬ 사항에 λ§žμΆ”μ–΄ μˆ˜μ • label Nov 11, 2025
pjs1710 and others added 3 commits November 12, 2025 04:24
Copy link
Copy Markdown
Contributor

@tkv00 tkv00 left a comment

Choose a reason for hiding this comment

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

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹€~!!

@tkv00
Copy link
Copy Markdown
Contributor

tkv00 commented Jan 2, 2026

/gemini

@gemini-code-assist
Copy link
Copy Markdown

It looks like you tried to invoke a command. To use Gemini Code Assist commands, please use /gemini <command> or @gemini-code-assist <command>. For example, to get a code review, you would type /gemini review or @gemini-code-assist review.

Here is a list of available commands:

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with πŸ‘ and πŸ‘Ž on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€, κΈ°μ‘΄ κΈ°λŠ₯을 μš”κ΅¬ 사항에 λ§žμΆ”μ–΄ μˆ˜μ •

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🌟 Feature : FCM μ•Œλ¦Ό μ‹œμŠ€ν…œ μ„€μ • μ„ΈνŒ… μž‘μ—…

2 participants