-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Generated TMC TIM Topic #100
Conversation
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimDepositController.java
Outdated
Show resolved
Hide resolved
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/services/asn1/Asn1DecodedDataRouter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good & the unit tests pass!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. This extra topic will be nice to have!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, but we'll want to tweak this to push the same TIM data as the topic.OdeTimJson, but with the additional asn1 field filled out. Since this is the encoded path, getting the combo is more challenging. One option we talked about is adding a key to the metadata (which is maintained through encoding) and using KTable on top of the ode tim topic to find the corresponding json and combine.
Updated this to include an additional topic, KeyedOdeTimJson, that has a unique identifier attached to the TIM JSON that allows for later querying in the Asn1EncodedDataRouter. I added a new topic instead of reusing the OdeTimJson topic as it prevents unnecessary information from being included in the OdeTimJson topic and allows for pushing a null record with the generated TIM UUID to erase the TIM record from TimJson-Store after it's been retrieved. I've also updated the diagrams to reflect these changes. |
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/services/asn1/Asn1EncodedDataRouter.java
Outdated
Show resolved
Hide resolved
jpo-ode-plugins/src/main/java/us/dot/its/jpo/ode/plugin/ServiceRequest.java
Outdated
Show resolved
Hide resolved
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimDepositController.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good & the unit tests pass, I just had one question/suggestion
@mwodahl looks like we have a merge conflict from Matt's properties changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my local testing, it looks like the topic.OdeTimJson
still is missing the asn1
field. Is this the expected behavior?
Yep, that's expected. The asn1 field will only be present in the topic.OdeTimJsonTMCFiltered topic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one comment
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/services/asn1/Asn1EncodedDataRouter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
PR Details
Description
This PR adds a new Kafka topic that contains TIMs generated by the TMC. This includes TIMs deposited via the TimDepositController, offloaded files, and those deposited through the TimReceiver.
Motivation and Context
This update allows users to access a Kafka topic that only contains TMC-generated TIMs.
How Has This Been Tested?
This has been tested locally with docker-compose and Postman. TIMs were verified to be deposited to the new topic in the event they were generated by the TMC using kcat.
Types of changes
Checklist:
ODE Contributing Guide