Is it possible to connect mongodb data as source to Kafka or apache structured streaming without mongodb having replica set?
For testing purposes you can create a single node “replica set”. In the Mongo shell define and configure as follows. My server host name is mongo1. localhost should work here as well.
rsconf = { _id : "rs0", members: [ { _id : 0, host : "mongo1:27017", priority: 1.0 }]};
rs.initiate(rsconf);
Note: Be sure to start the MongoDB service with the flag indicating its a replica set. Here my replica set name is rs0.
--replSet rs0