I've never worked with RIDE, so I'm not sure if you can directly import non-RF code/modules/libraries into RIDE. The library/module may have to follow RF library format/conventions in order to be imported. If that is the case, you would first have to wrap kafka-python into a custom RF library that RF understands. Then you can import this wrapper library into RIDE.
Perhaps other RF/RIDE users/developers of this group can clarify expectations here.
As for wrapping kafka-python, you would as I mentioned in previous email create & implement keyword methods/functions I listed such as this pseudo code sample:
def produce(kafka_broker_list, topic, json_message)
# put in the necessary kafka_python code to actually produce the message to topic, given the arguments provided to this method/keyword
Also, regarding the asynchronous messaging of kafka, depending on how you set up the test environment, this could be a potential issue for you. If you have an isolated test environment (1 producer, 1 consumer), then the asynchronous behavior will behave quite synchronously, and things will just work. As you produce message in your test, the consumer under test should have no problems consuming it. That and the fact that there are no other producers & consumers interfering by producing other messages or consuming your test messages unexpectedly.
But in a real live-like environment (staging or production), this asynchronous behavior will be hard to test deterministically as it will be hard to guarantee/correlate that a given message produced will be consumed right after because of other producers pushing in their non-test messages, and other consumers competing to consume the messages, whether they are test messages or not. So that needs to be accounted for and set up (or routed/filtered) properly or else you find you've sent a message but it doesn't appear to be consumed (or consumed too fast before you could validate). It's like testing multi-threading without explicit synchronization in your test.