PHPackages                             mrandmrssmith/idempotent-consumer-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mrandmrssmith/idempotent-consumer-bundle

ActiveLibrary

mrandmrssmith/idempotent-consumer-bundle
========================================

idempotent-consumer-bundle

2.0.0(1y ago)013.3k—5.6%2MITPHPPHP &gt;=7.4CI passing

Since Aug 29Pushed 1y ago8 watchersCompare

[ Source](https://github.com/mrandmrssmith/idempotent-consumer-bundle)[ Packagist](https://packagist.org/packages/mrandmrssmith/idempotent-consumer-bundle)[ RSS](/packages/mrandmrssmith-idempotent-consumer-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (10)Versions (4)Used By (2)

Symfony idempotent consumer core bundle
=======================================

[](#symfony-idempotent-consumer-core-bundle)

This is core bundle for idempotent consumer. It provides basic functionality to make your consumer idempotent.

Installation
------------

[](#installation)

Add this package to your project

```
composer require mrandmrssmith/idempotent-consumer-bundle
```

Usage
-----

[](#usage)

1. Structure:
    - `Persistance` - Provide interfaces for persistance
    - `Resolver` - Interface which should be use to retrive idempotent key from message and register of these resolvers
    - `Checker` - main service which will handle idempotent logic on message entry you should use this checker before message processing and based on result of check you should decide to process message or not
    - `Finalizer` - main service which will handle idempotent logic on message exit you should use this finalizer after message processing to mark message as processed or when message failed.
2. Implement `Persistance` interface
    - you can implement you own persistence by implement these interfaces and register them in services.
    - there is one ready persistence provided by `mrandmrssmith/idempotent-consumer-doctrine-persistence-bundle` which provide persistence layer using doctrine
3. Resolvers:
    - you have to implement key resolvers for your consumers.
    - it works as strategy pattern. You have to register your resolver and add tag `idempotent.key_resolver`
4. Checker and Finalizer
    - you have to use these services with your consumer checker on entry of message and finalizer after message processing
    - you can use package for symfony messenger `mrandmrssmith/idempotent-symfony-messenger-consumer-bundle`
5. Settings
    - By default failed messages which have status failed are skipped but it may be possible that you may want to try handle again message with status failed so there are 2 options for this
    - first option is in your configuration for this bundle set `process_failed_messages` to true

    ```
       mms_idempotent_consumer:
         process_failed_messages: true
    ```

    that will change default value (false) of `$wantToProcessFailedMessage` in `DefaultProcessFailedMessageVoter` to value which you set here
    - second option is implement own voter - that may be solution when you want to implement own logic which tell if we should handle this message again or not for that you should

    ```
       mms_idempotent_consumer:
         custom_process_failed_messages_voter: id_of_your_voter_service
    ```

    you can replace default voter to your own implementation of `ProcessFailedMessageVoter` what's provide you full control over processing failed messages.

---

Development
-----------

[](#development)

Dockerfile added for testing of local build...

To build the image see the `Makefile` for all available commands.

```
make build74
```

To run a composer install use;

```
make composer-install
```

---

### Unit Tests

[](#unit-tests)

To run them.

Run composer install first as above.

```
make tests-php7
```

### PHP Compatibility Testing

[](#php-compatibility-testing)

Run composer install first as above.

#### Project Files PHP 7.4

[](#project-files-php-74)

```
make phpcompat-74-src
```

#### Vendor Files PHP 7.4

[](#vendor-files-php-74)

```
make phpcompat-74-vendor
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance49

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~258 days

Total

2

Last Release

369d ago

Major Versions

1.0.0 → 2.0.02025-05-15

PHP version history (2 changes)1.0.0PHP &gt;=7.2

2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/a989b8a3335341544d351bceefcaa8426dc3a7af9df556a978beae890a330803?d=identicon)[gui-ver](/maintainers/gui-ver)

---

Top Contributors

[![jackwilsonsmith](https://avatars.githubusercontent.com/u/113099660?v=4)](https://github.com/jackwilsonsmith "jackwilsonsmith (2 commits)")[![michalboryczko](https://avatars.githubusercontent.com/u/50073344?v=4)](https://github.com/michalboryczko "michalboryczko (2 commits)")[![Robson-55](https://avatars.githubusercontent.com/u/44393451?v=4)](https://github.com/Robson-55 "Robson-55 (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mrandmrssmith-idempotent-consumer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mrandmrssmith-idempotent-consumer-bundle/health.svg)](https://phpackages.com/packages/mrandmrssmith-idempotent-consumer-bundle)
```

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
