transaction-outbox | Reliable eventual consistency for Microservices | Microservice library

 by   gruelbox Java Version: 5.2.360 License: Apache-2.0

kandi X-RAY | transaction-outbox Summary

kandi X-RAY | transaction-outbox Summary

transaction-outbox is a Java library typically used in Architecture, Microservice, Swagger applications. transaction-outbox has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

A flexible implementation of the Transaction Outbox Pattern for Java. TransactionOutbox has a clean, extensible API, very few dependencies and plays nicely with a variety of database platforms, transaction management approaches and application frameworks. Every aspect is highly configurable or overridable. It features out-of-the-box support for Spring DI, Spring Txn, Guice, MySQL 5 & 8, PostgreSQL 9-12 and H2.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              transaction-outbox has a low active ecosystem.
              It has 111 star(s) with 26 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 9 open issues and 16 have been closed. On average issues are closed in 163 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of transaction-outbox is 5.2.360

            kandi-Quality Quality

              transaction-outbox has no bugs reported.

            kandi-Security Security

              transaction-outbox has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              transaction-outbox is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              transaction-outbox releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed transaction-outbox and discovered the below as its top functions. This is intended to give you an instant insight into transaction-outbox implemented functionality, and help decide if they suit your requirements.
            • Executes the given task
            • Log a message at the specified level
            • Updates the attempt count
            • Returns a description for the task
            • Saves an entry in the table
            • Sets the insert statement
            • Deserialize an invocation
            • Replace immutable collections
            • Creates a thread - local transaction manager
            • Creates a new transaction
            • Deserialize a TransactionOutboxEntry
            • Deserialize an invocation from a reader
            • Creates an adapter for the given type
            • Registers a subtype
            • Unblock the given entry
            • Deletes an entry from the table
            • Add custom serializers
            • Obtain a connection to the driver
            • Perve the Invocation instance
            • Invoke a method on an object instance
            • Updates an entry in the table
            • Rehires an invocation within a transaction
            • Joins this listener with another listener
            • Validates the request
            • Retrieves the active transaction from the given context
            • Lock an entry in the transaction table
            Get all kandi verified functions for this library.

            transaction-outbox Key Features

            No Key Features are available at this moment for transaction-outbox.

            transaction-outbox Examples and Code Snippets

            transaction-outbox,Configuration reference
            Javadot img1Lines of Code : 82dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            TransactionManager transactionManager = TransactionManager.fromDataSource(dataSource);
            
            TransactionOutbox outbox = TransactionOutbox.builder()
                // The most complex part to set up for most will be synchronizing with your existing transaction
                //  
            Development snapshots
            Javadot img2Lines of Code : 24dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            
              
                github-transaction-outbox
                Gruelbox Github Repository
                https://maven.pkg.github.com/gruelbox/transaction-outbox
              
            
            
            
                
                    github-transaction-outbox
                    ${env.GITHUB_USERNAME}
                    ${env.GITHUB_TOKEN}
                
            
            
            repositories   
            transaction-outbox,Set up the background worker
            Javadot img3Lines of Code : 23dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            Thread backgroundThread = new Thread(() -> {
              while (!Thread.interrupted()) {
                try {
                  // Keep flushing work until there's nothing left to flush
                  while (outbox.flush()) {}
                } catch (Exception e) {
                  log.error("Error flushing tr  

            Community Discussions

            Trending Discussions on transaction-outbox

            QUESTION

            MassTransit In-Memory Outbox in Saga
            Asked 2020-Feb-23 at 19:19

            We did some load tests on a Saga with a In-Memory outbox. During those tests we simulated different types of failures: application restarts, infrastructure restart, message broker restart etc.

            We noticed, that some saga instances did not finish and we had a bunch of errors: Automatonymous.NotAcceptedStateMachineException: ... {SomeEvent}: Not accepted in state {SomeState}

            After some debuging we isolated the problem. I'll try to describe it using this sample code:

            ...

            ANSWER

            Answered 2020-Feb-23 at 19:19

            Since you've read the article on using the outbox, and you realize that you need to add a handler for Submit to the Submitted state, that's really the answer. However, unlike the original handler which updated the saga state and was persisted, you only need to regenerate the events that were sent/published. That handles the first part of the problem, Submitted.

            The second part is a different answer, and it is pretty simple actually. You don't finalize the order in Accept. You create an additional state, Accepted, that the order transitions to after being accepted. And you remove the order instances after a period of time (a week, a month, whatever). That way, when the Accept message is delivered to the Accepted instance, you can regenerate the events that were published.

            Now, you could use Quartz to schedule a future message to finalize the saga, which doesn't do any business logic, but only removes the saga instance. And you could set up an Initially(When(RemoveOrder).Ignore()) handler that would discard the remove order message if the saga doesn't exist. And that makes it automatic. But in past systems we've just archived a date range partition of the file group (in SQL server) or deleted the older records after 30 or 90 days or whatever.

            Source https://stackoverflow.com/questions/60364891

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install transaction-outbox

            Maven Central is updated regularly. However, if you want to stay at the bleeding edge, you can use continuously-delivered releases from Github Package Repository. These can be used from your production builds since they will never be deleted (unlike SNAPSHOTs).
            At the moment, if any work fails first time, it won't be retried. All we need to add is a background thread that repeatedly calls TransactionOutbox.flush() to pick up and reprocess stale work.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/gruelbox/transaction-outbox.git

          • CLI

            gh repo clone gruelbox/transaction-outbox

          • sshUrl

            git@github.com:gruelbox/transaction-outbox.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link