Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created January 22, 2024 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelDrogalis/c5ec9009787f77923f0fa964bf6ccb76 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/c5ec9009787f77923f0fa964bf6ccb76 to your computer and use it in GitHub Desktop.
{
"generators": [
{
"topic": "customers",
"value": {
"customerId": { "_gen": "uuid" },
"name": { "_gen": "string", "expr": "#{Name.full_name}" },
"address": { "_gen": "string", "expr": "#{Address.full_address}" },
"membership": {
"_gen": "oneOf",
"choices": [
"bronze", "silver", "gold"
]
}
},
"localConfigs": {
"throttle": {
"ms": {
"_gen": "normalDistribution",
"mean": 2000,
"sd": 200
}
}
}
},
{
"topic": "supportTickets",
"value": {
"ticketId": { "_gen": "uuid" },
"customerId": {
"_gen": "lookup",
"topic": "customers",
"path": [ "value", "customerId" ]
},
"ticketOpenTime": {
"_gen": "formatDateTime",
"ms": { "_gen": "now" }
}
},
"localConfigs": {
"throttle": {
"ms": {
"_gen": "uniformDistribution",
"bounds": [ 2000, 3000 ]
}
}
}
}
],
"connections": {
"dev-kafka": {
"kind": "kafka",
"producerConfigs": {
"bootstrap.servers": "localhost:9092",
"key.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer",
"value.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment