Skip to content

Commit a3d9b25

Browse files
committed
👀 README now have mentions about the expected/supported payloads in pub/sub messaging
1 parent 3f18578 commit a3d9b25

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

‎README.md‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,68 @@ app:
293293
- `ReadWriteRoutingAspect`: Sets the context based on transaction type
294294
- `DbContextHolder`: Thread-local holder for the current context
295295

296+
## Message Payloads
297+
298+
The application uses two main DTOs for message communication:
299+
300+
### PingDTO
301+
Used to publish flight position updates to the flight-tracker-event-app via WebSocket.
302+
303+
```json
304+
{
305+
"id": "uuid",
306+
"aircraft": {
307+
"icao24": "string",
308+
"callsign": "string",
309+
"origin_country": "string",
310+
"last_contact": "timestamp",
311+
"squawk": "string",
312+
"spi": boolean,
313+
"sensors": [integer]
314+
},
315+
"vector": {
316+
"velocity": double,
317+
"true_track": double,
318+
"vertical_rate": double
319+
},
320+
"position": {
321+
"longitude": double,
322+
"latitude": double,
323+
"geo_altitude": double,
324+
"baro_altitude": double,
325+
"on_ground": boolean,
326+
"source": integer,
327+
"time": "timestamp"
328+
},
329+
"last_update": "timestamp"
330+
}
331+
```
332+
333+
### FlightDataDTO
334+
Used to subscribe to flight tracker data from the flight tracker producer via Kafka.
335+
336+
```json
337+
{
338+
"icao24": "string",
339+
"callsign": "string",
340+
"origin_country": "string",
341+
"last_contact": long,
342+
"time_position": long,
343+
"longitude": double,
344+
"latitude": double,
345+
"baro_altitude": double,
346+
"on_ground": boolean,
347+
"velocity": double,
348+
"true_track": double,
349+
"vertical_rate": double,
350+
"sensors": [integer],
351+
"geo_altitude": double,
352+
"squawk": "string",
353+
"spi": boolean,
354+
"position_source": integer
355+
}
356+
```
357+
296358
## Project Structure
297359

298360
```

0 commit comments

Comments
 (0)