Skip to content

Commit c9d31af

Browse files
committed
Add logging
1 parent 7927d5d commit c9d31af

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@ private void ack(MessageId received) {
5555

5656
private void sendPulsarMessage(MessageId received, InternalMessages.StopEstimate estimate, long timestamp, String key) {
5757

58-
String tripId = estimate.getTripInfo().getTripId();
59-
log.info("TripId: {}", tripId);
58+
String routeId = estimate.getTripInfo().getRouteId();
59+
if (routeId.contains("31M")) {
60+
log.info("RouteId: {}", routeId);
61+
}
6062

6163
producer.newMessage()
6264
.key(key)
6365
.eventTime(timestamp)
6466
.property(TransitdataProperties.KEY_PROTOBUF_SCHEMA, ProtobufSchema.InternalMessagesStopEstimate.toString())
6567
.property(TransitdataProperties.KEY_SCHEMA_VERSION, Integer.toString(estimate.getSchemaVersion()))
66-
.property(TransitdataProperties.KEY_DVJ_ID, tripId) // TODO remove once TripUpdateProcessor won't need it anymore
68+
.property(TransitdataProperties.KEY_DVJ_ID, estimate.getTripInfo().getTripId()) // TODO remove once TripUpdateProcessor won't need it anymore
6769
.value(estimate.toByteArray())
6870
.sendAsync()
6971
.whenComplete((MessageId id, Throwable t) -> {

0 commit comments

Comments
 (0)