Skip to content

Commit 003987e

Browse files
committed
Add logging
1 parent 679e29d commit 003987e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/main/java/fi/hsl/transitdata/stopestimates/MessageHandler.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,18 @@ private void ack(MessageId received) {
5454
}
5555

5656
private void sendPulsarMessage(MessageId received, InternalMessages.StopEstimate estimate, long timestamp, String key) {
57-
57+
58+
String tripId = estimate.getTripInfo().getTripId();
59+
if (tripId.startsWith("HSL:31M")) {
60+
log.info("Metro trip. TripId: {}", tripId);
61+
}
62+
5863
producer.newMessage()
5964
.key(key)
6065
.eventTime(timestamp)
6166
.property(TransitdataProperties.KEY_PROTOBUF_SCHEMA, ProtobufSchema.InternalMessagesStopEstimate.toString())
6267
.property(TransitdataProperties.KEY_SCHEMA_VERSION, Integer.toString(estimate.getSchemaVersion()))
63-
.property(TransitdataProperties.KEY_DVJ_ID, estimate.getTripInfo().getTripId()) // TODO remove once TripUpdateProcessor won't need it anymore
68+
.property(TransitdataProperties.KEY_DVJ_ID, tripId) // TODO remove once TripUpdateProcessor won't need it anymore
6469
.value(estimate.toByteArray())
6570
.sendAsync()
6671
.whenComplete((MessageId id, Throwable t) -> {

0 commit comments

Comments
 (0)