Can I use MassTransit with Kafka rider and InMemory transport as a communication mechanism between the processes? Or the only option here is to use RabbitMq?
Kafka is neither designed nor intended to be used for IPC (inter-process communication). Kafka use cases are event streaming and data distribution/replication – use cases that are unidirectional architecturally.
I would not use Kafka for request/response or other dispatch-style command/event message patterns.
Unfortunately, this is opinion-based and your question isn't entirely clear as to your requirements. But based on what little information is available, a message broker is more suitable since you mentioned IPC.