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

Create a Function to Fetch and Store Messages from Negarit (message queue) #6

Open
biniyam-29 opened this issue Nov 15, 2024 · 0 comments
Assignees

Comments

@biniyam-29
Copy link
Collaborator

Develop a backend function for fetching messages directly from Negarit’s service and storing them in the SoulSync database. This function will handle messages such as mentor requests or updates, ensuring they are stored securely and made available for the platform’s matchmaking processes. The function will run independently of the frontend, triggered periodically or by specific events.

Detailed Requirements:

1. Purpose:

  • Automate the retrieval and storage of messages from Negarit to keep SoulSync’s database updated in real time,

2. Negarit API Integration:

  • Use Negarit’s API to fetch messages.
  • Ensure the API integration is robust and capable of handling large volumes of messages.

3. Data Processing:

  • Extract relevant fields from each message:
  • messageContent: Text of the message.
  • senderId: Identifier for the message sender.
  • timestamp: When the message was created.
  • Perform any necessary transformations to align the message format with SoulSync’s database schema.

4. Database Storage:

  • Save each message to the database, ensuring data integrity.
  • Implement checks to prevent duplicate messages from being stored unnecessarily.
  1. Error Handling & Logging:
  • Log all successful fetch and save operations for monitoring purposes.
  • For errors (e.g., connection issues, invalid data), log detailed error messages and implement retry logic where applicable.

6. Scalability & Security:

  • Ensure the function can handle high volumes of messages if SoulSync scales. (eg. Batch Processing)
  • Use secure API keys or tokens to authenticate with Negarit.
@biniyam-29 biniyam-29 converted this from a draft issue Nov 15, 2024
@biniyam-29 biniyam-29 changed the title Create a Function to Fetch and Store Messages from Negarit Create a Function to Fetch and Store Messages from Negarit (message queue) Nov 15, 2024
@biniyam-29 biniyam-29 self-assigned this Nov 15, 2024
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

No branches or pull requests

1 participant