You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proved to be a tougher nut to crack than expected, but after some experimentation and bouncing off some walls, here is what I came up with:
The name "prefix" seems too implementation specific. I'd recommend going back to the "namespace" terminology as it's easier to explain without delving too much into the implementation.
I did some research and it seems there is nothing against sending a query string in a POST request (ie. the HTTP spec does not specifically deny it and people seem to accept it as a viable solution). Why is a query string better? Easier to represent in the OpenAPI spec.
With those in mind:
OpenMeter would create a "default" (empty) namespace on launch (In case of Kafka and KSQLDB this means the current behavior)
Sending a POST /api/namespaces request will create a namespace (TODO: come up with a validation rule for the name) (In case of Kafka and KSQLDB, it means new events and detected_events topic/table)
Sending a POST /api/ingest request (without namespace) will land the event in the "default" (empty) namespace (ie. no topic name prefix)
Sending a POST /api/ingest?namespace=asd request will land the event in the "asd" namespace (ie. topic name will be om_asd_events)
It took me some time to figure out a way to even think about the prefix concept in a consistent way and I realized that it's not a good term we can easily explain or reason about, so I decided to change it.
Currently, we use a hardcoded prefix
om_
to prefix Kafka topics. For example:Requirements:
OM-Prefix
.om_
prefix.events
anddetected_events
topics:POST /api/ingests
om_events
andom_detected_events
topics.The text was updated successfully, but these errors were encountered: