AWS SNS Publish message method is not working inside a UNIX server #2867
Unanswered
MuthiahPrabhakaran
asked this question in
Q&A
Replies: 1 comment 3 replies
-
The fact that there's no error in the logs is strange, maybe the exception is being swallowed? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Below is the program that I am using to publish a message to SNS. There is no issue when I execute this program(simple Java or Spring boot) in my local system. The message is published on the topic.
But, the actual program runs inside a thread in a spring boot project. The thread runs every 1 minute. Whenever the thread runs, the below program has to publish the message. This spring boot project deployed inside a standalone Unix server. From the server, it is not publishing messages. There is no exception. The logs are showing a successful handshake to the Amazon network.
I tried AmazonSNS and SnsClient classes as well. It is an even worse situation when I used these two. When the program executes the publish method without the Async process, it blocks the thread entirely. After that, that thread itself stopped working. No logs, or exceptions. That is why I changed the program to Async.
Current dependencies that I am using:
I tried the below things already.
However, when I published a message from the Unix box using AWS CLI, the message was published successfully.
Did anyone face a similar issue? If not, you can share any alternative way to hit the SNS from a Java program if you know.
Beta Was this translation helpful? Give feedback.
All reactions