Comments (5)
I recommend you look closely at your worker.properties file, as the configuration problem could be there. It's also a good idea to look at your log file, particularly the Kafka consumer and producer properties dumps which show exactly what Mirus and Kafka Connect are attempting to connect to.
from mirus.
@pdavidson100 Below is the worker properties file. Note that mirroring works fine when i do a mirroring within the cluster ie when i pass "destination.bootstrap.servers": "localhost:9092" and "consumer.bootstrap.servers": "localhost:9092" in connector. But when i change to "destination.bootstrap.servers": "localhost:9093" and try to consume from the broker running with 9093 port, it does not work. Should i be adding any additional parameter in connector for destination cluster as well?
##
# Mirus Quickstart worker properties file
#
# This file can be passed to `bin/mirus-worker-start.sh` to quickly get a basic Mirus worker up and
# running.
#
# ---
# Kafka broker bootstrap server - this is Source cluster
bootstrap.servers=localhost:9092
group.id=mirus-quickstart
key.converter=org.apache.kafka.connect.converters.ByteArrayConverter
value.converter=org.apache.kafka.connect.converters.ByteArrayConverter
header.converter=org.apache.kafka.connect.converters.ByteArrayConverter
key.converter.schemas.enable=false
value.converter.schemas.enable=false
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false
config.storage.topic=mirus-config
status.storage.topic=mirus-status
offset.storage.topic=connect-offsets
# In a production environment these values should be increased
config.storage.replication.factor=1
offset.storage.replication.factor=1
status.storage.replication.factor=1
from mirus.
Yes, you need to configure the producers created by the Kafka Connect workers in the usual way. This config lives under producer.*
in the worker properties file. Try adding this:
producer.bootstrap.servers=localhost:9093
from mirus.
@pdavidson100 Thanks, the above configuration worked for 1 on 1 mirroring. However when i have 2 source clusters and make below configuration entries mirroring happens only from 1 source and not the other source.
# Kafka broker bootstrap server - this is Source cluster
bootstrap.servers=localhost:9092
consumer.bootstrap.servers=localhost:9094,localhost:9092
producer.bootstrap.servers=localhost:9093
group.id=mirus-quickstart
key.converter=org.apache.kafka.connect.converters.ByteArrayConverter
value.converter=org.apache.kafka.connect.converters.ByteArrayConverter
header.converter=org.apache.kafka.connect.converters.ByteArrayConverter
key.converter.schemas.enable=false
value.converter.schemas.enable=false
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false
config.storage.topic=mirus-config
status.storage.topic=mirus-status
offset.storage.topic=connect-offsets
# In a production environment these values should be increased
config.storage.replication.factor=1
offset.storage.replication.factor=1
status.storage.replication.factor=1
connector config
curl localhost:8083/connectors/mirus-quickstart-source/config \
-X PUT \
-H 'Content-Type: application/json' \
-d '{
"name": "mirus-quickstart-source",
"connector.class": "com.salesforce.mirus.MirusSourceConnector",
"tasks.max": "5",
"topics.whitelist": "test-mir",
"destination.topic.name.suffix": "",
"destination.bootstrap.servers": "localhost:9093",
"consumer.bootstrap.servers": "localhost:9092,localhost:9094",
"consumer.client.id": "mirus-quickstart",
"consumer.key.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer",
"consumer.value.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer"
}'
Also when i add additional servers in producer.bootstrap.servers and destination.bootstrap.servers mirroring happens only to one node and not both destination nodes.
Is this the right way to configure multi cluster mirroring?
from mirus.
For multiple source clusters you just need to configure multiple connector config instances and give each one a unique name (e.g. PUT different config to /connectors/quickstart1/config
and /connectors/quickstart2/config
) . One connector config should have consumer.bootstrap.servers=localhost:9092
, the other should have consumer.bootstrap.servers=localhost:9094
. No need to configure multiple bootstrap servers in your Worker properties file.
Kafka Connect Source Connectors do no directly support multiple destination Kafka clusters within the same Kafka Connect cluster. This is because the producer bootstrap is a Worker-level property (i.e., all workers must produce to the same destination cluster). The work-around is to configure multiple independent Kafka Connect sub-clusters, each with different admin topic names and worker configurations. However, this is not usually necessary because the recommended approach is to co-locate your Kafka Connect cluster with your destination Kafka cluster. That means there should always be one independent Kafka Connect cluster for each destination Kafka cluster anyway.
from mirus.
Related Issues (20)
- Mirror not correct HOT 1
- Getting similar function as "measuring lag" (mirrormaker) in mirus HOT 6
- Deprecate Prefix & Suffix settings in favor of RegexRouter HOT 1
- Enabling SSL connectivity HOT 9
- failed to run the quick start example HOT 4
- Mirus failing to start when brokers are deployed to new ip's HOT 7
- Can we manipulate the filter any of the config parameters(eg. password configuration) during the GET call HOT 5
- mirus.connector.auto.restart.enabled doesnt work HOT 1
- org.apache.kafka.common.errors.RecordTooLargeException produce duplicated messages
- API end point for health check HOT 2
- Mirus deployed in k8s pod is failing with "java.lang.OutOfMemoryError" HOT 2
- Mirus tasks failing with error "Could not initialize class org.xerial.snappy.Snappy"
- Can Mirus run as a Kafka Connect connector? HOT 2
- Configuring the Mirus quickstart to replicate from one system to another HOT 7
- Not able to convert header value of replicated topic from ByteArray to String HOT 1
- Produce msg to topic test does not reflect on test.mirror HOT 1
- Default consumer offset reset policy - earliest HOT 3
- ReplayPolicy.IGNORE does not process new records HOT 2
- SSL configuration
- Excessive logging (Exception thrown while calling task.commitRecord())
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 mirus.