Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection tester #40

Merged
merged 5 commits into from
May 19, 2022
Merged

Connection tester #40

merged 5 commits into from
May 19, 2022

Conversation

KaraMelih
Copy link
Collaborator

What does this PR do?

  • It actually does two things (that I should have separated)
  • 1st it fixes the wrong filename selection when a plugin script was used. Before, it was first making a file name "0-SNEWS_ALERT..." saving this, and when plugin script was called it was making a new file name by increasing the count "1-SNEWS_ALERT...". If fixed this by returning the saved file name to the plugin.
  • 2nd I made a CLI tool for testing connection snews_pt test-connection
    The logic behind the connection is (following this issue Test Connection Ideas SNEWS_Coincidence_System#11)
    I open two streams one for publishing and one for reading. I add a time stamp and submit a "test-connection" message, within the other stream I read the last message within last 5 seconds, if the time stamp in that message is the same with the one we published, I display connection verified message.

@KaraMelih
Copy link
Collaborator Author

This PR checks the connection to the kafka brokers, however using the same logic and making some adjustments to the snews_cs backend we can also test connections to the servers.
In that case server should submit another message when it sees "test-connection" in the id, and we try to see that message on the user side.

@Storreslara Storreslara merged commit e99bbb7 into main May 19, 2022
@KaraMelih KaraMelih deleted the connection-tester branch May 20, 2022 08: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.

2 participants