# Rejecting a record through topic's Schema

**URL:** <https://forum.confluent.io/t/rejecting-a-record-through-topics-schema/4223>\
**Category:** Schema Registry\
**Created:** [18 February 2022 14:30 UTC](https://forum.confluent.io/t/rejecting-a-record-through-topics-schema/4223 "2022-02-18T14:30:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![confluentdev](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@confluentdev](https://forum.confluent.io/u/confluentdev)\
**Post date:** [18 February 2022 14:30 UTC](https://forum.confluent.io/t/rejecting-a-record-through-topics-schema/4223/1 "2022-02-18T14:30:05Z")

</div>

My goal is I want to use Java to produce a record to a topic.  
If the record does not match the existing schema on topic, the record should be rejected.

I had follow the steps on the below page and able to produce a record to a topic.  
However, there appears to be no schema validation from the topic side.  
If I send records not matching the schema that is on the topic, the records still go through.

Is there additional configuration necessary?

[https://docs.confluent.io/platform/current/schema-registry/serdes-develop/serdes-json.html#json-schema-serializer](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/serdes-json.html#json-schema-serializer)

---

<div class="post-metadata">

**Author:** ![ryokota](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ryokota/32/3901_2.png) [@ryokota](https://forum.confluent.io/u/ryokota)\
**Post date:** [25 February 2022 16:05 UTC](https://forum.confluent.io/t/rejecting-a-record-through-topics-schema/4223/2 "2022-02-25T16:05:22Z")

</div>

Did you set `json.fail.invalid.schema=true`?

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [2 March 2022 22:08 UTC](https://forum.confluent.io/t/rejecting-a-record-through-topics-schema/4223/3 "2022-03-02T22:08:24Z")

</div>

Keep in mind that topics do not have schemas. Server-side validation is only available in Confluent Server.

The JSONSchemaSerializer on the client-side is what will accept/deny any events from continuing to the topic.
