Dynamic Fields and Table Cache in Apache Ignite In-Memory Database - spring-boot

I am implementing the Apache Ignite In-Memory Database in sync with external Database (Primary DB) for spring boot application. In that How can I create a cache for dynamic entities from table that is present in the Primary DB for SQL queries that needs to be run on Ignite.
Eg. I have two tables one is table1 and other is table1_summ in this table1_summ is created from table1 so Is their any way we can fetch the Sql Fields from Primary table?

Related

How to send rest request for only particular records in a Oracle database table using Spring Boot

I have created a simple service using Spring Boot. There is a table Message_Queue as shown in this image link -
Message_Queue Table
I am using oracle database. Here, msisdn is a number which is primary key, and it has some other fields like sim_number, activation_date, subscription_id.
There is another Spring Boot service which sends rest API request to add the activation_date and subscription_id details for the respective record in message_queue table. Table message_queue holds data upto 2 million records.
I want to create a scheduled task in my Spring Boot application, which will send rest API request to some other 3rd service only for those records which has activation_date and subscription_id details filled and will also delete that record from the table.
What is the best way to achieve that using Spring Boot framework? Please try to answer on the enterprise level standards.
Is it a good approach to fetch like 1000 records with pagination until all the records are not checked from the table and then check for each record if it has activation_date and subscription_id or not, if it has then send a rest request for the record and also a delete request to the DB for the same record?

Migrate Javers audit data across databases

In our project we are implementing Javers to records audits in Oracle , and looking for any API support to migrate audit data from Oracle to PostgreSQL or to Mongo as we need to migrate from oracle to other database in near future.
Please advise

AxonIQ AxonFramework MongoEventStorageEngine framework table creation on business DB

I am using AxonIQ AxonFramework version 4.5.3 with Spring Boot and custom event store.
I'm using MongoEventStorageEngine and configured a separate MongoDB database for the EventStorage.
I am doing some business logic with my business database through a microservice. In the same microservice, I've configured the custom EventStorage.
But a few tables (viz. association_value_entry, saga_entry, token_entry) are getting created on my business database which is a PostgresDB.
Why is AxonFramework creating new tables in my business database as I have already configured a separate MongoDB database for EventStorage. All the related database objects for Axon to work should be ideally created in the EventStorage database rather than in my business database.
The tables you are mentioned should be part of your 'read' model (I believe that is what you called business database).
They are not used for Event Storage or Event Sourcing but rather to specific things that are controlled on client side. For example, token_entry, among other things, is the table where your app keep track of the tokens and events it already consumed - you can read more about it here. Similar to the saga tables, where Sagas are stored on the client side having nothing to do with the Event Store - you can read more about it here.

How to make Spring Data JPA and MongoDb multi-tenant at the same time?

I am using Spring Data JPA and MongoDb in my rest application. My database structure is such that for each Customer type, we have a separate oracle and mongodb. Whenever a Customer makes an http request to my rest server, based on some request header parameter i determine the customer type.
For instance, for Customer type A, there will be an "Oracle database A" and "Mongo database A". Similarly there will be "Oracle database B" and "Mongo database B" for customer type B and so on. The number of Customer types are fixed.
Now what i want is, suppose if Customer B makes an http request, then for this particular thread, all oracle hits should go to Oracle Database B and all mongo hits should go to Mongo database B.
I am aware of AbstractRoutingDataSource for making JPA multi-tenant but cannot think of a way to make both MongoDb and Oracle multi-tenant at the same time.

Refreshing the ElasticSearch index from RDBMS using Spring Data

I have the following setup :
Mysql RDBMS server
Elastic Search Server
My requirement is to copy data periodically from MYSQL RDBMS and update Elastic server with it.Currently i am following the approach below :
A Batch Job which reads all data from MYSQL using Spring Data Jpa
It then pushes all data to elastic server using spring data elastic
This approach is very cumbersome and not efficient.Is there a way where i can read only the updated values using spring data and update the index accordingly in elastic.
Using jdbc-river etc is not an option for me as the application uses Spring data elastic to get data and search over elastic search,with jdbc-river it will not be able to function properly i think.

Resources