title: How to connect Redpanda cluster and topic to Redpanda Schema Registry?
body: <p>I am trying to connect a running redpanda kafka cluster to a redpanda schema registry, so that the schema registry verifies incoming messages to the topic, and/or messages being read from the topic.</p>
  <p>I am able to add a schema to the registry and read it back with curl requests, as well as add messages to the kafka topic I created in the redpanda cluster.</p>
  <p>My question is, how to implement the schema registry with a topic in a kafka cluster? Like how do I instruct the schema registry and/or the kafka topic to validate incoming messages against the schema I added to the registry?</p>
  <p>Thanks for your help or a point in the right direction!</p>
  <p>Relevant info:</p>
  <p>Cluster &amp; topic creation:
  <a href="https://vectorized.io/docs/guide-rpk-container" rel="nofollow noreferrer">https://vectorized.io/docs/guide-rpk-container</a></p>
  <pre><code>rpk container start -n 3
  rpk topic create -p 6 -r 3 new-topic --brokers &lt;broker1_address&gt;,&lt;broker2_address&gt;...
  </code></pre>
  <p>Schema Registry creation:
  <a href="https://vectorized.io/blog/schema_registry/" rel="nofollow noreferrer">https://vectorized.io/blog/schema_registry/</a></p>
  <p>Command to add a schema:</p>
  <pre><code>curl -s \
    -X POST \
    &quot;http://localhost:8081/subjects/sensor-value/versions&quot; \
    -H &quot;Content-Type: application/vnd.schemaregistry.v1+json&quot; \
    -d '{&quot;schema&quot;: &quot;{\&quot;type\&quot;:\&quot;record\&quot;,\&quot;name\&quot;:\&quot;sensor_sample\&quot;,\&quot;fields\&quot;:[{\&quot;name\&quot;:\&quot;timestamp\&quot;,\&quot;type\&quot;:\&quot;long\&quot;,\&quot;logicalType\&quot;:\&quot;timestamp-millis\&quot;},{\&quot;name\&quot;:\&quot;identifier\&quot;,\&quot;type\&quot;:\&quot;string\&quot;,\&quot;logicalType\&quot;:\&quot;uuid\&quot;},{\&quot;name\&quot;:\&quot;value\&quot;,\&quot;type\&quot;:\&quot;long\&quot;}]}&quot;}' \
    | jq
  </code></pre>