Here is a comprehensive example of how to use Kafka with EDFS. This guide covers publish, subscribe, and the filter directive. All examples can be modified to suit your specific needs. The schema directives and edfs__* types belong to the EDFS schema contract and must not be modified.
The routing url is still mandatory due a limitation. You can specify anything to make it pass.
Router config
Based on the example above, you will need a compatible router configuration.
config.yaml
events:providers:kafka: - id:my-kafka# Needs to match with the providerID in the directivetls:enabled:trueauthentication:sasl_plain:password:"password"username:"username"brokers: - "localhost:9092"
Example Query
This query assumes that your implemented employee subgraph can resolve the fields.
subscription { filteredEmployeeUpdatedMyKafka(employeeID: 1) { id tag details { surname } }}