A Queue manager for send records from ADempiere to queue, this implementation was created with kafka queue. The scope for this is a little test using a external queue for process documents and also is just a project used for learn about micro-services and a hobby of saturday :)
This project is directly related to OpenSearch-Gateway-rs. I you want to test it then is nice if you can deploy the project OpenSearch-Gateway-rs.
A simple config for queue can be this:
The runnning is:
A simple request for adempiere menu using adempiere-grpc-server take almost 1.02 seconds.
A request using the OpenSearch-Gateway-rs take almost 47 ms.
The main reason is that OpenSearch is a special service for queries. You can learn anout it in the official page
All packages was sign with entity type code eca56
, note that this way is more clear and simple for look at
org.spin.eca56.model.validator
org.spin.eca56.setup
org.spin.eca56.util
org.spin.eca56.util.queue
org.spin.eca56.util.support
org.spin.eca56.util.support.documents
org.spin.eca56.util.support.kafka
The main validator is located at org.spin.eca56.model.validator.EngineAsQueue
, this read all tables flagged as document and add these tables to trigger:
TIMING_AFTER_COMPLETE
TIMING_AFTER_REVERSECORRECT
TIMING_AFTER_REVERSEACCRUAL
TIMING_AFTER_VOID
This project has two deploy class for all functionality:
org.spin.eca56.setup.CreateConfig
: Create a App registration for connect with kafka server with the follow data:- Value:
Engine-Queue
- Name:
Engine as Queue
- Host:
localhost
- Port:
29092
- Value:
org.spin.eca56.setup.DeployValidator
: Create the model validator config linked to current client
You can get all binaries from github here.
All contruction is from github actions
All dictionary changes are writing from XML and all XML's hare xml/migration
Is very easy.
- Gradle
implementation 'io.github.adempiere:adempiere-kafka-connector:1.0.0'
- SBT
libraryDependencies += "io.github.adempiere" % "adempiere-kafka-connector" % "1.0.0"
- Apache Maven
<dependency>
<groupId>io.github.adempiere</groupId>
<artifactId>adempiere-kafka-connector</artifactId>
<version>1.0.0</version>
</dependency>