{"repo":"Trendyol/Jdempotent","free":true,"listed":false,"github":"https://github.com/Trendyol/Jdempotent","clone":"git clone https://github.com/Trendyol/Jdempotent.git","description":"Make your consumer, API, etc. idempotent easily.","language":"Java","stars":116,"topics":["idempotency","idempotent-consumer","transactional-consumer","idempotent-kafka","idempotent-rabbitmq","couchbase","redis"],"license":"MIT","category":"databases-storage","readme_excerpt":"Jdempotent Goal of this Jdempotent-spring-boot-starter Make your endpoints idempotent easily Usage 1. First of all, you need to add a dependency to pom.xml For Redis: For Couchbase: 2. You should add @IdempotentResource annotation to the method that you want to make idempotent resource, listener etc. If want that idempotencyId in your payload. Put @JdempotentId annotation that places the generated idempotency identifier into annotated field. Can be thought of as @Id annotation in jpa. You might want to handle the name of the field differently to ensure idempotency. Just use @JdempotentProperty annotation needs to get the field name differently and generate the hash inspired by jackson (@JsonProperty annotation) 3. If you want to handle a custom error case, you need to implement ErrorConditionalCallback like the following example: 4. Let's make the configuration: For redis configuration: For couchbase configuration: Please note that you can disable Jdempotent easily if you need to. For example, assume that you don't have a circuit breaker and your Redis is down. In that case, you can disable Jdempotent with the following configuration: Performance As it is shown in the following image, the most cpu consuming part of Jdempotent is getting a Redis connection so we don't need to worry performance related issues. Docs Jdempotent Medium Article Jdempotent-core Javadoc Jdempotent-spring-boot-redis-starter Javadoc Support memojja's twitter Licence MIT Licence Contributing 1. Fork it ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Trendyol","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Trendyol/Jdempotent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}