Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer is not receiving any messages #14

Open
chinastockproducts opened this issue May 16, 2018 · 10 comments
Open

Consumer is not receiving any messages #14

chinastockproducts opened this issue May 16, 2018 · 10 comments

Comments

@chinastockproducts
Copy link

We are trying to use the same from code , but consumer topic is not receiving any messages on target side
export CLASSPATH=/Users/sxe518/Documents/test/MirrorMakerHandler/target/TopicSwitchingHandler-1.0-SNAPSHOT.jar
bin/kafka-mirror-maker.sh --consumer.config config/consumer.properties --producer.config config/producer.properties --whitelist test_.* —message.handler com.shapira.examples.TopicSwitchingHandler --message.handler.args ‘test,test123’
MirrorMakerHandler.zip

@OneCricketeer
Copy link

OneCricketeer commented May 21, 2018

--message.handler.args ‘test,test123’

A topic name cannot contain commas. Here you have made the prefix contain them

@chinastockproducts
Copy link
Author

Those are 2 different topic names test is from source and test123 is on consumer side.

@OneCricketeer
Copy link

I think you're misinterpreting the arguments then

public TopicSwitchingHandler(String topicPrefix) {
        this.topicPrefix = topicPrefix;
    }

Therefore, you're setting this.topicPrefix="test,test123"

@chinastockproducts
Copy link
Author

ok so we need to use test.test123 right?

@OneCricketeer
Copy link

Depends on your goal.

If you want to rename multiple topics, look at https://github.com/opencore/mirrormaker_topic_rename

@chinastockproducts
Copy link
Author

i followed opencore with the arguments--message.handler.args ‘test,test123’ . But i dont see topic test123 receiving messages from test. Is it any issue related to version of kafka..we are using kafka 1.1.0

@OneCricketeer
Copy link

If your source topic name is test, then your whitelist is only watching topics starting with test_, so the test topic itself is ignored...

This project is adding a prefix. The other project is completely renaming a topic. Using the format <src>,<dest>;<src2>,<dest2>

@OneCricketeer
Copy link

OneCricketeer commented May 22, 2018

If you look at the example given there, you'd see their source topic does contain an underscore - test_source

--message.handler com.opencore.RenameTopicHandler --message.handler.args 'test_source,test_target'

Meanwhile, this project does not have an underscore in the topic name, and serves a different purpose

--message.handler com.shapira.examples.TopicSwitchingHandler --message.handler.args dc1 --whitelist mm1

It adds dc1 onto mm1

@ashuit87
Copy link

ashuit87 commented Apr 7, 2020

JavaSessionize.avro.LogLinec reference unresolved in the code, kindly look into it

@OneCricketeer
Copy link

@ashuit87 No it isn't. Use mvn compile to generate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants