-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unique identifier #54
Comments
That could be the record offset. |
Is the record offset something set explicitly in the Unified Schema, and assigned by the producer? |
A Kafka record is uniquely identified by its topic, partition, and offset. With those three pieces of information, you can command a client to seek to the given record. I would suggest developing some notation combining those three fields. |
Thanks Leo. |
The topic is certainly known before submission. As for the partition, all of our topics currently use a single partition, although that might not always be the case. I would think that there is probably a way for a producer to get the offsets of records it has sent shortly after they are flushed. Why does your producer need to know the offsets of records it has sent? |
Need to know the notice ID for reference purposes. |
Kafka records can also have keys. I suggest that you study the Streams Concepts page, particularly the parts on keys, partitions, and timestamps. |
We do not yet have a design for a unique notice identifier. I am just leaving this as background reading. |
@Tohuvavohu a quick update on this: I made a PR for the gcn.nasa.gov that updates the sample code to print out the offset number. If you want to print it in a consumer, you can add
|
Thanks @dakota002 ! :) |
Do you think it makes sense to append the ID number to the alert packet itself? |
I would say it technically is. If you consider the alert packet as the whole message object, and keep in mind that the JSON is just the |
Right, but can it be appended to the |
You don't really know the offset until the Kafka broker has ingested the record. So that's not really possible. |
figured that might be the case, thanks. |
Just to clarify: this is what's intended to be included when one uses the "reference" the gcn-schema/core/FollowUp schema, like: "reference": { "gcn.notices.LVK.alert": 6666 }, Additionally, confirming there's no ability to access this if you're using older GCN interfaces, correct? |
In order to be able to cite notice messages individually, we need to add a unique identifier for each message in the producer class. This could include a unique string for each producer than a alphanumeric string for each message.
The text was updated successfully, but these errors were encountered: