Hi, I added Kafka destination to my self-hosted ru...
# support
f
Hi, I added Kafka destination to my self-hosted rudderstack cluster on kubernetes, and rudder recognized the kafka destination, but does not send data to the topic. I tested kafka cluster and I could send events to it manually. there is no error in Kafka and Rudderstack logs. Any idea how should I debug this? Rudder image tag: 1.3.4 Rudder logs: customdestinationmanager/customdestinationmanager.go:222 [CDM KAFKA] Config changed. Closing Existing client for destination: kafka customdestinationmanager/customdestinationmanager.go:230 [CDM KAFKA] DestID: 2Jri3ccKkYUgAO0WqpMcGEBkI3i, Created new client (edited)
r
Hi Javad, have you made sure the topic name has been populated in the destination settings for the Kafka destination and if yes, are you sure it is the correct value and it correlates to the topic name in Kafka? If both are a yes could you please share a sample payload that you are seeing come into RudderStack from your source which is missing in Kafka?
f
Thanks @red-engineer-90710 yes, I'm sure, actually I added kafka before and it was working, but after changing version rudder recognize kafka and creates router for it but not sending events, I change image tag to 1.3.4. here is a sample payload:
{ "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "2.15.0" }, "traits": { "cellphone": "XXXXXX", "email": "", "active_address_id": 28547838, "latitude": 35.60988470470809, "longitude": 51.30466513336755, "platform": "PWA", "activeAddress": {} }, "library": { "name": "RudderLabs JavaScript SDK", "version": "2.15.0" }, "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0", "os": { "name": "", "version": "" }, "locale": "en-US", "screen": { "density": 2, "width": 1440, "height": 900, "innerWidth": 1440, "innerHeight": 429 }, "sessionId": 1673010108009, "campaign": {}, "page": { "path": "/", "referrer": "$direct", "referring_domain": "", "search": "", "title": "test", "url": "https://example.com", "tab_url": "https://example.com/", "initial_referrer": "$direct", "initial_referring_domain": "" } }, "type": "track", "messageId": "1673010152391000-ffdba9d2-aed7-4238-ba5d-288aa09bead8", "originalTimestamp": "2023-01-06T130232.391Z", "anonymousId": "2d08d002-b36e-4087-94e8-0471196151d9", "userId": "1645886", "event": "Promotion Viewed", "properties": { "promotion_id": "vendorcollection-TOP", "creative": "vendor slider", "name": "bests", "position": "4", "platform": "PWA", "activeAddress": {} }, "integrations": { "All": true }, "sentAt": "2023-01-06T130232.393Z" }
r
Yeah that payload looks fine to me, thank you for sharing. Could you try one thing? Could you try and add the Kafka topic in the
integrations
object and see if that changes anything about the event flowing to Kafka? Here's an example from the docs:
Copy code
integrations: {
      "All": true,
      "Kafka": {
        "topic": "myTopic",
      },
    }
I would expect the topic to be added based on you having added it in the destination setting but let's try to hard code that into the event itself just incase the newly upgraded 1.3.4 does something funky with it. Let me know if there's any difference when you add the topic in the
integrations
object
f
OK Thanks a lot, I will inform you.
Yes, it was from client, I tested with rudder-analytics-react projects, and events showed up in kafka, but I didn't do anything special, just:
rudderanalytics.load("1wUM5JSho82tHXltTg9gFlUa581", "https://xxxxxx.com", { batchMode: true, batchFactor: 5 });
Tomorrow I will check the js sdk loading code with client side people.