The contents of this repository has moved to https://github.com/projectriff/riff/tree/master/message-transport
= Message Transport
== Purpose
The *message transport* is a https://projectriff.io/[Riff] component that enables the HTTP gateway to send messages
to function pods and, when appropriate, to receive replies.
It provides a message type and an abstract transport interface for sending and
receiving messages. It also provides an implementation of the transport interface
based on https://kafka.apache.org/[Apache Kafka].
== Development
The code in this repository is written in Go.
=== Get the source
[source, bash]
----
cd $(go env GOPATH)
git clone -o upstream https://github.com/projectriff/message-transport src/github.com/projectriff/message-transport
----
=== Building
This repository is a dependency of the https://github.com/projectriff/http-gateway[http-gateway]
and https://github.com/projectriff/function-sidecar[function-sidecar] repositories
and is built by them.
You can check that the code in this repository compiles cleanly by issuing:
[source, bash]
----
make build
----
=== Testing
Ensure Kafka (with `auto.create.topics.enable=true`, which is the default) and Zookeepr are running locally,
then issue:
[source, bash]
----
KAFKA_BROKERS=localhost:9092 make test
----
== Generating Mocks
Mocks can be regenerated as follows _and should then be checked in_:
[source, bash]
----
make gen-mocks
----
You can verify that generated mocks which are committed or staged are up to date using:
[source, bash]
----
make verify-mocks
----