Skip to content

Conversation

@nebjak
Copy link
Contributor

@nebjak nebjak commented Apr 6, 2025

Adds a complete HTTP REST API with JSON endpoints for all message queue operations.

Features:

  • POST /add - Add message (returns created Message object)
  • POST /get - Retrieve messages with count parameter
  • POST /delete - Delete messages by IDs
  • POST /purge - Clear all messages
  • POST /retry - Retry failed messages
  • GET /hello - Health check endpoint

Implementation:

  • Axum web framework with JSON request/response
  • Comprehensive integration test suite
  • Input validation and error handling
  • Returns full Message objects (not just success strings)

Breaking Change:

  • New API endpoints require HTTP clients instead of direct library usage

@nebjak nebjak requested a review from Copilot April 6, 2025 18:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

@nebjak nebjak requested a review from Copilot April 6, 2025 18:16

This comment was marked as outdated.

@nebjak nebjak marked this pull request as ready for review April 27, 2025 16:40
@nebjak nebjak changed the title feat: api for messages feat: implement REST API for message queue operations Aug 16, 2025
@nebjak nebjak requested a review from Copilot August 16, 2025 12:03

This comment was marked as outdated.

@nebjak nebjak requested a review from Copilot August 16, 2025 12:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a complete REST API for message queue operations using the Axum web framework. The API provides JSON endpoints for all message queue operations including adding, retrieving, deleting, purging, and retrying messages, along with a health check endpoint.

Key changes:

  • Complete REST API implementation with JSON request/response handling
  • Comprehensive integration test suite covering all endpoints
  • Service layer refactoring to use Arc for thread safety

Reviewed Changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/api/* New API module with handlers, models, and health check endpoint
src/services/mod.rs Refactored MessageService to use Arc and return Message objects
src/storage/traits.rs Added Send + Sync bounds to Storage trait for thread safety
src/main.rs Updated to run Axum web server instead of simple CLI
tests/* Comprehensive integration test suite for all API endpoints
Cargo.toml Added web framework and testing dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nebjak nebjak merged commit e63e40f into main Aug 16, 2025
1 check passed
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