Spring cloud steam registry and Avro schema files - rabbitmq

I've setup the Spring Avro schema registry provided in Spring Cloud Stream for use in RabbitMQ. Most examples I see use the Maven Avro plugin to generate Java classes from schema resource files. The schema files are then registered in the schema registry. My understanding is that this registry enables a message to be serdes with just a reference to a registered schema instead of including the entire schema in the message. What I don't understand is how these schema files are subsequently distributed amongst all services at design-time to generate Java class files. The Maven plugin requires the schema files to be on the classpath. What is best practice in dealing with Avro schema definitions? Any advance would be greatly appreciated.

The message producer, defines the message format with the schema. Once done they register the schema in Schema registry and let the other services know what is the schema/schema id.
Then consumers can fetch the schema from schema registry and generate POJO classes based on the schema.
As time goes, producer may alter the schema (according to Avro rules), but still the consumer should be able to receive the messages without any change to the producer.

Related

spring cloud config server with multiple property sources

I have spring cloud config server reading properties from multiple sources (Git and Vault). For a given path, even it finds the resource in Git, it still queries vault and report failure as the resources are not available at both sources. My requirement is to look for a resource and if its found, no need to query the other source. Please suggest if its possible. Thanks

Spring cloud config precedence property files

Trying to read about the precedence of loading several properties in Spring cloud config, I am not finding my case to figure it out which is the precedence of properties. My case is the next:
I have the next properties in the spring cloud config application:
application.properties
application-dev.properties
nameOfApplicationXX.properties
nameOfApplicationXX-dev.properties
I am launching the app nameOfApplicationXX with the dev profile. My case is that application-dev.properties has one property and this property is not being overriden by the same property present in nameOfApplication.properties. So, application-dev.properties has preference over nameOfApplicationXX.properties because the first one is specifying a profile?
Which is the precedence of each one? Do you know the docs reference because I am not finding it
Thanks
If I understood your problem correctly then the below is the solution I have found from the Spring Cloud Config document reference:
"If the repository is file-based, the server creates an Environment from application.yml (shared between all clients) and foo.yml (with foo.yml taking precedence). If the YAML files have documents inside them that point to Spring profiles, those are applied with higher precedence (in order of the profiles listed). If there are profile-specific YAML (or properties) files, these are also applied with higher precedence than the defaults. Higher precedence translates to a PropertySource listed earlier in the Environment. (These same rules apply in a standalone Spring Boot application.)"
Spring Cloud Config reference link : Documentation
Note: By seeing the above problem statement I can say that you are using file based profile in Spring cloud Config server. The Spring Cloud Config server will return List of Property Sources for each type as a classpath resource properties.
To override the the default implementation I have implemented the same and reference code is available in gitHub link : Source Code
Not a similar issue but may help you : reference issue
Hope this will help you to fix the above mentioned problem statement.

Talend runtime config file

I publish a RESTful webservice with Talend ESB and want to run it in the Talend runtime.
As I want to use some variables from my own custom config file. I.e. database credentials etc.
This file should be external fro the OSGI deploy file to get modified after compilation.
Where could I place this file and how would I reference it in the Talend job design?
There are two ways we can load external config files to a talend job
1 . Using Implicit context option as shown below
Using tFileInputProperties and tContextLoad
Talend has a built in method (called implicit context) for importing your own configuration file and accessing those values in your code. This works the same for both Talend ESB and Platform for Data Management and takes literally a couple of minutes at most to setup.
In your ESB studio go to file--> edit project properties. In the Project Setting window select Job Settings --> Implicit Context Load. Choose the file option, set the path and choose a field separator. The file layout is simple: key and value separated by the field separator you chose.
I use this for database credentials and other things as you mentioned. In your job you need to add each key as a context and Talend will automatically load these for you at run time. Makes no difference if its a Data Integration job or an ESB running on OSGI. This uniformity across products is a great benefit of using Talend.

Get my dropwizard application operating against a specified schema

How do I get my dropwizard application to operate against a specified schema, a schema other than the default 'public'?
The postgres user has all privileges on schemas 'public' and 'schema1'. It should be doing a lookups on 'schema1' tables but it comes back as (tablename) doesnt exist, even though it clearly does. This is because its looking at the 'public' schema
Should this be handled on the application side i.e dropwizard hibernate config, or on the database side. How should i tackle this? Is there a standard way?
Thanks guys
The dropwizard use a yml configuration file, in this file you can configure your database connection, the correctly use is the configuration file.

What is the purpose of datasync project in weblogic project?

What is the purpose of datasync project in weblogic project?
What is *.evt, *.req, *.usr files?
There is a good explanation on the docs about datasync. Basically it is a webapp used to copy data across from one weblogic server instance (actually from it's database) to another. Example - copying all the data from production to test instances.
*.evt, *.req, *.usr files are XML format files used in Weblogic Portal applications.
EVT files are event files which can be triggered at any user interaction with the Portal. This is mainly used for capturing user behaviour and firing any rules, an example is a
campaign fired for specific users.
REQ files define the HttpRequest attributes
USR files define UserProfile attributes