This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch azure-kafka-schema-registry-sink-ex in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit b77218a1b734070a2e8e93052f447f1db4ffeaae Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Nov 7 11:54:12 2023 +0100 Added an example of usage of Azure Schema Registry Kafka Sink Kamelet Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- ...l => azure-kafka-schema-registry-producer.yaml} | 38 +++++++++++++--------- .../kafka-kamelet-log.yaml | 2 +- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml b/jbang/azure-eventhubs-kafka-azure-schema-registry/azure-kafka-schema-registry-producer.yaml similarity index 63% copy from jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml copy to jbang/azure-eventhubs-kafka-azure-schema-registry/azure-kafka-schema-registry-producer.yaml index 1e13d04..33f40d3 100644 --- a/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml +++ b/jbang/azure-eventhubs-kafka-azure-schema-registry/azure-kafka-schema-registry-producer.yaml @@ -18,26 +18,32 @@ # camel-k: dependency=mvn:com.acme.example:azure-identity:0.1 - beans: - - name: defaultAzureCredential - type: "com.acme.example.azure.DefaultAzureCredentialWrapper" - name: order type: "com.acme.example.eventhubs.models.Order" + properties: + orderId: 1 + itemId: "123" + userId: "oscerd" + quantity: 3 + - name: defaultAzureCredential + type: "com.acme.example.azure.DefaultAzureCredentialWrapper" - route: - id: "kafka-to-log" from: - uri: "kamelet:kafka-azure-schema-registry-source" + uri: "kamelet:timer-source" parameters: - topic: "{{topic}}" - bootstrapServers: "{{bootstrap.servers}}" - consumerGroup: 'azure-consumer-group' - password: "{{password}}" - azureRegistryUrl: '{{schema.registry.url}}' - specificAvroValueType: 'com.acme.example.eventhubs.models.Order' + message: '{"id":"1","message":"Camel Rocks"}' + contentType: "application/json" + repeatCount: 1 steps: - - to: - uri: "kamelet:log-sink" - parameters: - showStreams: true - showHeaders: true - multiline: true + - set-body: + simple: "${ref:order}" + - to: + uri: "kamelet:kafka-azure-schema-registry-sink" + parameters: + topic: "{{topic}}" + bootstrapServers: "{{bootstrap.servers}}" + consumerGroup: 'azure-consumer-group' + password: "RAW({{connectionstring}})" + azureRegistryUrl: '{{schema.registry.url}}' + specificAvroValueType: 'com.acme.example.eventhubs.models.Order' diff --git a/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml b/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml index 1e13d04..4b97c2d 100644 --- a/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml +++ b/jbang/azure-eventhubs-kafka-azure-schema-registry/kafka-kamelet-log.yaml @@ -31,7 +31,7 @@ topic: "{{topic}}" bootstrapServers: "{{bootstrap.servers}}" consumerGroup: 'azure-consumer-group' - password: "{{password}}" + password: "RAW({{connectionstring}})" azureRegistryUrl: '{{schema.registry.url}}' specificAvroValueType: 'com.acme.example.eventhubs.models.Order' steps: