Comments (4)
You just need to send an header together with the payload to the sink connector. This header should be named "CamelHeader.Authorization" with the bearer token as value.
from camel-kafka-connector-examples.
Ok, so I am using the unofficial strimzi-cli here for local testing and Strimzi is running in kubernetes.
I made a file called producer.properties
with the following on my local machine:
CamelHeader.Authorization=Bearer 123token456
Then I run this command to create a producer from the cli
kfk console-producer --topic my-topic -c my-cluster -n default --producer.config producer.properties
Then I paste the following:
{"message": "foo"}
I see my consumers do get the message including the connector.
However I am still getting 403
back from the endpoint from within the sink connector.
Did I even do what you are saying?
How to debug the actual request getting made to the endpoint? I want to see the headers, body and all.
I also get this warning when I open the producer terminal:
WARN The configuration 'CamelHeader.Authorization' was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)
from camel-kafka-connector-examples.
I would use Kafkacat and add a
-H CamelHeader.Authorization="Bearer 123token456"
from camel-kafka-connector-examples.
Oh my hero! Kafkacat worked well for me. It looks like there is a bug in the Strimzi CLI. I was pulling my hair out. I'll let them know something isn't working right. Thanks.
from camel-kafka-connector-examples.
Related Issues (20)
- Add Spring-RabbitMQ connector examples
- Example for minio with ByteArrayConverter HOT 13
- Minio-Connector example with deleteAfterRead, retrieve only once and consume large message size. HOT 1
- Create camel-kafka-connector-examples-0.9.0 tag HOT 1
- camel-tar.gzfile Not Found HOT 1
- Bump Example to version 0.10.0
- HDFS connector examples HOT 17
- Example how to export from Kafka to S3 and import back from S3 to Kafka both key and value HOT 2
- Tag 0.11.0 Examples
- Failed to run the github-source-events example HOT 6
- Add CamelGooglesheetsSinkConnector example
- Source Sftp connector HOT 2
- camel-kafka-connector-examples HOT 9
- Split Examples into 0.11.x and 1.0.x
- Move examples to 0.11.5
- FHIR Source Connector config fails ro resolve endpoint HOT 2
- Kamelet with id cassandra-sink not found in locations: classpath:/kamelets HOT 17
- Camel AWS S3 source connector - Error org.reflections.ReflectionsException: Scanner SubTypesScanner was not configured HOT 11
- Examples for websocket kafka connector (as a client)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camel-kafka-connector-examples.