amqp producer writing data into only one partition #5087
Unanswered
iamrsaravana
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Could you please use code formatting to make the YAML example readable? The way you pasted them makes it impossible to see the structure. As for the actual issue, I have no idea how the connector or connect decide where to send the message. A lot will depend on the connector what key does it give to the message etc. If it gives it always the same key for example, the messages will always end up in the same partition -> this is an important design feature of Kafka. |
Beta Was this translation helpful? Give feedback.
2 replies
-
how do we change incoming key values from camel AMQP source connector? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please use this to only for bug reports. For questions or when you need help, you can use the GitHub Discussions, our #strimzi Slack channel or out user mailing list.
Describe the bug
A clear and concise description of what the bug is.
i am using topic configuration:
topic.yaml
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: my-topic-excavator
labels:
strimzi.io/cluster: my-cluster
spec:
partitions: 3
replicas: 3
config:
retention.ms: 7200000
segment.bytes: 1073741824
Connect.yaml
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnect
metadata:
name: my-connect-cluster-excavator
annotations:
strimzi.io/use-connector-resources: "true"
spec:
image: 10.128.0.6:5000/my-connector-crusher1
replicas: 1
bootstrapServers: my-cluster-kafka-bootstrap:9092
config:
group.id: connect-cluster-new-excavator
#key.converter: org.apache.kafka.connect.storage.StringConverter
#key.converter: org.apache.kafka.connect.json.JsonConverter
#value.converter: org.apache.kafka.connect.json.JsonConverter
#key.converter.schemas.enable: false
#value.converter.schemas.enable: false
offset.storage.topic: connect-cluster-offsets-excavator
config.storage.topic: connect-cluster-configs-excavator
status.storage.topic: connect-cluster-status-excavator
config.storage.replication.factor: 3
offset.storage.replication.factor: 3
status.storage.replication.factor: 3
AMQP source connector:
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnector
metadata:
name: camelamqpsourceconnector-excavator
labels:
strimzi.io/cluster: my-connect-cluster-excavator
spec:
class: org.apache.camel.kafkaconnector.amqp.CamelAmqpSourceConnector
tasksMax: 1
topics: mytopic
config:
camel.component.amqp.includeAmqpAnnotations: true
camel.component.amqp.connectionFactory: '#class:org.apache.qpid.jms.JmsConnectionFactory'
camel.component.amqp.connectionFactory.remoteURI: amqp://10.97.217.229:15672
camel.component.amqp.username: consumer@HONO
camel.component.amqp.password: verysecret
camel.component.amqp.testConnectionOnStartup: true
camel.source.path.destinationType: queue
camel.source.path.destinationName: telemetry/1_TENANT
topics: my-topic-excavator
the above configuration writing only to one parition(0) only all the data. we are not able to see data in parition 1 or 2
./bin/kafka-console-consumer.sh --bootstrap-server 10.104.7.152:9092 --topic my-topic-excavator --partition 1
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
YAML files and logs
Attach or copy paste the custom resources you used to deploy the Kafka cluster and the relevant YAMLs created by the Cluster Operator.
Attach or copy and paste also the relevant logs.
To easily collect all YAMLs and logs, you can use our report script which will automatically collect all files and prepare a ZIP archive which can be easily attached to this issue.
The usage of this script is:
./report.sh [--namespace <string>] [--cluster <string>]
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions