Commit Graph

23 Commits

Author SHA1 Message Date
Oleg Zhurakousky
e319fe8c02 GH-1294 Fixed NPE in AvroSchemaRegistryClientMessageConverter
The NPE was a result of not following defensive programming practices and that is fixed.
Also, we already support both reader and writer schema being null where new ReflectDatumReader(type) is used in getDatumReader(..)  operation.
That said there may still be conditions which are not supported and that is okay since in the end it's a MessageConverter and as such it is one
of the extension points of the framework allowing user to provide a custom one follwing instructions in 'User-defined Message Converters' of the reference guide.

Resolves #1294
2018-06-11 15:29:59 -04:00
Soby Chacko
76ac4983f9 Add ConditionalOnMissingBean on SchemaRegistryClient configuration
Resolves #1307
Resolves #1308
2018-06-11 15:28:15 -04:00
jmaxwell
ba077b58fc GH-1292 Remove Unnecessary ByteBuffer
Resolves #1292
Resolves #1293
2018-06-11 15:27:13 -04:00
jmaxwell
bbc43016df 1217 Disable Pretty Print
Resolves #1224
2018-06-11 15:07:01 -04:00
Oleg Zhurakousky
0670a36ef2 Polishing DefaultSchemaRegistryClient
- made RestTemplate final
- removed setter

Resolves #1222 #1223
2018-06-11 15:06:38 -04:00
jmaxwell
c23d6ed99e 1222 DefaultSchemaRegistryClient should accept a custom RestTemplate.
Added protected accessors to allow subclasses access to RestTemplate and endpoint fields.
2018-06-11 15:06:17 -04:00
jmaxwell
688d73597c 1218 Inconsistent use of AvroSchemaRegistryClientMessageConverter.AVRO_FORMAT 2018-06-11 14:58:16 -04:00
jmaxwell
30ad6b659a 1215 CachingCachingRegistryClient stores data by wrong keys resulting in fetch operations always missing.
Resolves #1216
2018-06-11 14:53:02 -04:00
jmaxwell
7d5b538009 1202 Inconsistent use of this.prefix in AvroSchemaRegistryClientMessageConverter.resolveSchemaForWriting
Resolves #1202
Resolves #1203
2018-06-11 14:50:10 -04:00
Vinicius Carvalho
11b21d9eec Fixes issue with originalContentTypeHeader
- Fixes #1072
- Added a new ContentTypeResolver that searches for originalContentType
  as well as contentType headers
2017-09-11 09:55:07 -04:00
Vinicius Carvalho
007594cafd Fixes issue with originalContentType 2017-08-24 20:25:21 -04:00
Ilayaperumal Gopinathan
b10a014273 Minor refactoring 2017-07-17 07:51:31 +05:30
Vinicius Carvalho
661f8494a3 Fix Confluent Schema Registry registration
Changing internal registration logic

Adding some tests

Resolves #985 #1014
2017-07-17 07:51:31 +05:30
Jon Archer
b1285c3d4a Extract schema version not id in register method.
Fix #965

Original implementation was getting the schema id and using it as the
version. This made deserialization fail since it would endeavor to
retrieve the schema by version using the id value.
2017-05-15 22:01:29 -04:00
Ilayaperumal Gopinathan
bd002e4aaf Add code formatting guidelines
Add 'eclipse' folder containing Eclipse code
formatter configuration and instructions how to use
 it.

Update rule for join_wrapped_lines

 - Set to `false`

Resolves #930

Update README

Address review comments
2017-05-15 13:03:45 -04:00
Oleg Zhurakousky
8e77993fad GH-897 fixed the NPE issue with CacheManager
- Added a new constructor which takes CacheManager as an argument
- Deprecated the old constructor and setter for CacheManager
- Added fallback to NoOpsCacheManager to the deprecatd construtor to avoid the possiblity of NPE.
- Added warning to notify user that caching is _effectively disabled_ if NoOpCacheManager is used.

Fix #897
2017-05-10 22:53:58 -04:00
Julian Hanhart
d250022250 Fix URLs used by ConfluentSchemaRegistryClient
Fix #845

Fixed resource path for fetch by SchemaReference in the ConfluentSchemaRegistryClient.
2017-03-20 11:39:48 -04:00
Marius Bogoevici
21cc1e9b58 Polishing 2017-03-08 16:09:55 -05:00
Vinicius Carvalho
4cd9b0c3ec Introducing caching
Fix #832 #752

Adds caching capabilities to the converter. Remote calls to the
registry, Schema Parsing and toString were very expensive operations
that are now being cached

Adds a decorator to the registryClient that allows caching of remote
invocations.

Fixing review comments
2017-03-08 12:45:19 -05:00
Ilayaperumal Gopinathan
8792423abc Not enforcing EnableAutoConfiguration on aggregate parent
- The aggregate parent configuration now imports the required auto configuration classes such as ChannelBindingAutoConfiguration and EndpointAutoConfiguration
while `@EnableBinding` is still at the parent configuration to be able to share the binding configuration among the child applications
 - Add `ConditionalOnMissingBean` in spring cloud stream auto configuration classes so that if `EnableAutoConfiguration` is enabled at child application classes
they don't get instantiated again
 - Conditionally import EmbeddedServlet auto-configuration when web environment is enabled for parent
 - Add test

Resolves #737
2017-02-16 15:48:52 +00:00
Marius Bogoevici
f6073ade89 Fix id type on SchemaRegistrationResponse
Fixes #739

Use primitive type in `SchemaRegistryClient`
2016-12-19 21:17:39 +05:30
making
9f067a6907 Add spring-boot-configuration-processor to SCSt schema/server
Add spring.cloud.stream.schemaRegistryClient.enabled
2016-11-23 12:39:39 +05:30
Vinicius Carvalho
4422b21438 Add Avro serialization and schema management support
- Add schema server implementation
- Add schema client abstraction
- Add schema client implementation for own schema registry server
- Add schema client supporting Confluent schema registry
- Add Avro-based message converter supporting a static schema resource
- Add Avro-based message converter with schema evolution support, via
  schema registry client.
- On serialization, the converter register writer schemas with the schema
  registry server and augment the content type of outbound message with
  schema information.
  On deserialization, the reading converter will fetch the schema from the server
  if not available locally.

Use class information if schema is not specified

In the case of SpecificRecord and Reflective readers/writers, the class information can be used instead

Make subtype prefix configurable and shorten the subject

- Subtype prefix is now configurable and subject is the lowercase schema name
- Enhance/correct javadoc

Refine AbstractAvroMessageConverter

- distinguish between writer and reader schema when reader is created

Add schema registry and schema registry client docs
2016-07-31 21:26:36 -04:00