Skip to content

Implement Vehicle Location Streaming with MQTT and SSE.#62

Merged
muhammadzkralla merged 2 commits into
developfrom
feature/sse-location-stream
Jun 28, 2026
Merged

Implement Vehicle Location Streaming with MQTT and SSE.#62
muhammadzkralla merged 2 commits into
developfrom
feature/sse-location-stream

Conversation

@muhammadzkralla

Copy link
Copy Markdown
Member

This pull request introduces real-time vehicle location streaming for trips using Server-Sent Events (SSE) and MQTT integration. The main changes include a new DTO for streaming vehicle location, updates to the MQTT service to handle streaming messages, and new methods in the trip service to manage SSE emitters and broadcast location updates to clients.

Vehicle Location Streaming Feature:

  • Added a new SSE endpoint (/api/trips/{tripId}/location/stream) in TripController to allow clients to subscribe to real-time vehicle location updates for a trip.
  • Introduced VehicleStreamLocationDto to encapsulate vehicle location data sent via MQTT.
  • Updated MqttService to handle topic/trip/stream_location messages, parse the payload, and trigger location broadcasts. [1] [2] [3]
  • Added methods in TripService and TripServiceImpl to manage SSE emitters (subscribeToLocationStream) and broadcast location updates to subscribed clients (broadcastLocationStream). [1] [2]

Configuration Updates:

  • Registered the new MQTT topic topic/trip/stream_location in both application-docker.yml and application-test.yml to ensure the service subscribes to location stream messages. [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@muhammadzkralla
muhammadzkralla merged commit 13ecba8 into develop Jun 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants