github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/schema_registry_decode.md (about) 1 --- 2 title: schema_registry_decode 3 type: processor 4 status: experimental 5 categories: ["Parsing","Integration"] 6 --- 7 8 <!-- 9 THIS FILE IS AUTOGENERATED! 10 11 To make changes please edit the contents of: 12 lib/processor/schema_registry_decode.go 13 --> 14 15 import Tabs from '@theme/Tabs'; 16 import TabItem from '@theme/TabItem'; 17 18 :::caution EXPERIMENTAL 19 This component is experimental and therefore subject to change or removal outside of major version releases. 20 ::: 21 Automatically decodes and validates messages with schemas from a Confluent Schema Registry service. 22 23 24 <Tabs defaultValue="common" values={[ 25 { label: 'Common', value: 'common', }, 26 { label: 'Advanced', value: 'advanced', }, 27 ]}> 28 29 <TabItem value="common"> 30 31 ```yaml 32 # Common config fields, showing default values 33 label: "" 34 schema_registry_decode: 35 url: "" 36 ``` 37 38 </TabItem> 39 <TabItem value="advanced"> 40 41 ```yaml 42 # All config fields, showing default values 43 label: "" 44 schema_registry_decode: 45 url: "" 46 tls: 47 skip_cert_verify: false 48 enable_renegotiation: false 49 root_cas: "" 50 root_cas_file: "" 51 client_certs: [] 52 ``` 53 54 </TabItem> 55 </Tabs> 56 57 Decodes messages automatically from a schema stored within a [Confluent Schema Registry service](https://docs.confluent.io/platform/current/schema-registry/index.html) by extracting a schema ID from the message and obtaining the associated schema from the registry. If a message fails to match against the schema then it will remain unchanged and the error can be caught using error handling methods outlined [here](/docs/configuration/error_handling). 58 59 Currently only Avro schemas are supported. 60 61 ### Avro JSON Format 62 63 This processor creates documents formatted as [Avro JSON](https://avro.apache.org/docs/current/spec.html#json_encoding) when decoding Avro schemas. In this format the value of a union is encoded in JSON as follows: 64 65 - if its type is `null`, then it is encoded as a JSON `null`; 66 - otherwise it is encoded as a JSON object with one name/value pair whose name is the type's name and whose value is the recursively encoded value. For Avro's named types (record, fixed or enum) the user-specified name is used, for other types the type name is used. 67 68 For example, the union schema `["null","string","Foo"]`, where `Foo` is a record name, would encode: 69 70 - `null` as `null`; 71 - the string `"a"` as `{"string": "a"}`; and 72 - a `Foo` instance as `{"Foo": {...}}`, where `{...}` indicates the JSON encoding of a `Foo` instance. 73 74 ## Fields 75 76 ### `url` 77 78 The base URL of the schema registry service. 79 80 81 Type: `string` 82 83 ### `tls` 84 85 Custom TLS settings can be used to override system defaults. 86 87 88 Type: `object` 89 90 ### `tls.skip_cert_verify` 91 92 Whether to skip server side certificate verification. 93 94 95 Type: `bool` 96 Default: `false` 97 98 ### `tls.enable_renegotiation` 99 100 Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`. 101 102 103 Type: `bool` 104 Default: `false` 105 Requires version 3.45.0 or newer 106 107 ### `tls.root_cas` 108 109 An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. 110 111 112 Type: `string` 113 Default: `""` 114 115 ```yaml 116 # Examples 117 118 root_cas: |- 119 -----BEGIN CERTIFICATE----- 120 ... 121 -----END CERTIFICATE----- 122 ``` 123 124 ### `tls.root_cas_file` 125 126 An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. 127 128 129 Type: `string` 130 Default: `""` 131 132 ```yaml 133 # Examples 134 135 root_cas_file: ./root_cas.pem 136 ``` 137 138 ### `tls.client_certs` 139 140 A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both. 141 142 143 Type: `array` 144 145 ```yaml 146 # Examples 147 148 client_certs: 149 - cert: foo 150 key: bar 151 152 client_certs: 153 - cert_file: ./example.pem 154 key_file: ./example.key 155 ``` 156 157 ### `tls.client_certs[].cert` 158 159 A plain text certificate to use. 160 161 162 Type: `string` 163 Default: `""` 164 165 ### `tls.client_certs[].key` 166 167 A plain text certificate key to use. 168 169 170 Type: `string` 171 Default: `""` 172 173 ### `tls.client_certs[].cert_file` 174 175 The path to a certificate to use. 176 177 178 Type: `string` 179 Default: `""` 180 181 ### `tls.client_certs[].key_file` 182 183 The path of a certificate key to use. 184 185 186 Type: `string` 187 Default: `""` 188 189