The default codebase hard-codesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/amitsaxena098/OpenKnowledgeStream/llms.txt
Use this file to discover all available pages before exploring further.
localhost:9092 for Kafka and localhost:9200 for OpenSearch directly in KafkaPublish, KafkaConsume, and OpensearchConfig. Before deploying to any environment beyond your laptop you must replace those values, rebuild the project, and choose a process supervision strategy. This guide covers the end-to-end path from local development to a production-ready deployment.
Pre-deployment checklist
Update the Kafka broker address in KafkaPublish
Open For a multi-broker cluster, provide a comma-separated list of
wiki-change-stream/src/main/java/WikiChangeStream/publish/KafkaPublish.java and replace the hardcoded value:KafkaPublish.java
host:port pairs. Not every broker needs to be listed — just enough for initial discovery.Update the Kafka broker address in KafkaConsume
Make the same change in
opensearch-wiki-indexer/src/main/java/WikiIndexer/consumer/KafkaConsume.java:KafkaConsume.java
Update the OpenSearch host in OpensearchConfig
Edit Use
opensearch-wiki-indexer/src/main/java/WikiIndexer/config/OpensearchConfig.java to point the RestClient at your production cluster:OpensearchConfig.java
"https" as the scheme and port 443 (or whichever your cluster exposes) when TLS is enabled.Secure OpenSearch with authentication
Production OpenSearch clusters typically require authentication. Add a Read the password from an environment variable or a secrets manager — never commit credentials to source control.
BasicCredentialsProvider to the RestClient builder in OpensearchConfig:OpensearchConfig.java
Externalizing configuration with Spring Boot (suggested refactor)
The addresses for Kafka and OpenSearch are currently hardcoded directly in Java source files — there are noapplication.properties entries for them today. As a recommended improvement, you can move these addresses into Spring Boot externalized configuration so they can be changed at runtime without rebuilding.
Step 1 — Inject values with @Value
Replace the hardcoded string literals in KafkaPublish and KafkaConsume with injected fields:
KafkaPublish.java
KafkaConsume and expose opensearch.host, opensearch.port, and opensearch.scheme in OpensearchConfig.
Step 2 — Add the new properties to application.properties
Once the @Value annotations are in place, add the corresponding keys to wiki-change-stream/src/main/resources/application.properties:
application.properties
KAFKA_BOOTSTRAP_SERVERS → kafka.bootstrap.servers (relaxed binding). You can therefore pass values as environment variables without modifying the properties file:
Running as a systemd service
To keep the application running across reboots and have the OS restart it on failure, install it as asystemd unit.
Step 1 — Copy the JAR to a stable location
/etc/systemd/system/openknowledgestream.service
/etc/openknowledgestream/env