Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Issue in SNS binder health indicator if topic ARN is given instead of topic name #158

Open
dixitprashant444 opened this issue Aug 14, 2023 · 1 comment

Comments

@dixitprashant444
Copy link

dixitprashant444 commented Aug 14, 2023

When we deployed our service after moving to the given sns binder, we observed that our service is restarting very frequently. After further investigation, we found that service health check was failing with following response:

"binders": {
            "status": "DOWN",
            "components": {
                "sns": {
                    "status": "DOWN",
                    "details": {
                        "SNS": "topic is not reachable"
                    }
                },
                "sqs": {
                    "status": "UP"
                }
            }
        }

We looked into SnsBinderHealthIndicator class and found that sns binder takes topic names mentioned in properties & also pulls all the topics for the given AWS account and then matches.
We mention topic ARN instead of just topic name in our properties. This causes failure in topic name match & throws "topic is not reachable" error. The reason for putting topic ARN instead of just name is that we have a use case of publishing messages to cross AWS account topic. Although, it is able to send messages to within as well as cross AWS account with topic ARN (as spring code takes care of it) but sns health check fails.

@mKeRix @hendrik-nibbrig-idealo

@Aryelmr
Copy link

Aryelmr commented Jan 15, 2024

Please, review the PR to fix this existing bug: #186

Just the fix to match when provided the TopicARN and few optimization on the unit test

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants