The server will compile to an executable named nats-kafka
. A
configuration file is required to start the server.
To specify the configuration file, use the -c
flag:
% nats-kafka -c <config file>
You can use the -D
, -V
or -DV
flags to turn on debug or verbose logging.
The -DV
option will turn on all logging, depending on the config file
settings, these settings will override the ones in the config file.
This project uses go modules and provides a make file. You should be able to simply:
% git clone https://github.com/nats-io/nats-kafka.git
% cd nats-kafka
% make build
Targets
make build
- buildnats-kafka
make install
- buildnats-kafka
and move to your Go bin foldermake test
- setup Docker containers, run Go tests, teardown containersmake test-failfast
- likemake test
, but stop on first failuremake test-cover
- likemake test
, but get coverage report
You can build the docker image using:
% make docker dtag=0.5
Then run it with:
% docker run -v <path to config>:/conf/kafkabridge.conf "natsio/nats-kafka:0.2.0" -c /conf/kafkabridge.conf
Be sure to include your monitoring port, for example, if port 9090 is used for monitoring, you can run with:
% docker run -v <path to config>:/conf/kafkabridge.conf -p 9090:9090 "natsio/nats-kafka:0.2.0" -c /conf/kafkabridge.conf