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

Confusion around topic names and differences in app vs debezium kafka connector #88

Open
safandi opened this issue Jun 18, 2021 · 0 comments

Comments

@safandi
Copy link

safandi commented Jun 18, 2021

In your repo under outbox you have a file called "register-postgres.json"
based on the parameters:

"database.server.name": "dbserver1",
"schema.whitelist": "inventory",
"table.whitelist": "public.outboxevent",

So with quarkus microservice app1 i am able to populate the outboxevent table with payload and when i goto kafka server and run the command i see the topic "dbserver1.public.outboxevent"

Now with quarkus microservice app2 i am trying to consume the message/event in the topic above with following application.properties settings:
mp.messaging.incoming.user.connector=smallrye-kafka
mp.messaging.incoming.user.topic=dbserver1.public.outboxevent
mp.messaging.incoming.user.bootstrap.servers=kafka:9092
...more settings...

app2 microservice is not doing anything.

I also noticed in your "outbox" related examples your instructions to install connector via "register-postgres.json" results in a topic name "dbserver1.public.outboxevent" which doesnt match with what you are mentioning in the Quarkus code and the application.properties:
smallrye.messaging.source.orders.type=io.smallrye.reactive.messaging.kafka.Kafka
smallrye.messaging.source.orders.topic=order.events

Can you please explain what i am missing and how this works? and why the topics are different in the application code and settings from what i see with kafka-topics.sh?

Also another issue I faced was the config for installing connector. the following dont work for me:
"transforms" : "outbox",
"transforms.outbox.type" : "io.debezium.transforms.outbox.EventRouter",
"transforms.outbox.route.topic.replacement" : "${routedByValue}.events",
"transforms.outbox.table.field.event.timestamp: "timestamp"

When I install the connector without the above parameters it works fine and i can see the payload in the topic "dbserver1.public.outboxevent" with schema. Also, When i set:
key.converter.schemas.enable=false
value.converter.schemas.enable=false

in the properties file then the payload in topic is without Schema

So Basically i am confused about why the connector topic settings differ from the application.properties settings in terms of topic related details?

Isn't it suppose to consume events from the topic which is created on kafka? If yes why are the topic name values different on server vs the code/properties?
Would really love to understand how all of this works. Thanks.

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

1 participant