PHPackages                             softonic/thumper - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. softonic/thumper

ActiveLibrary[Queues &amp; Workers](/categories/queues)

softonic/thumper
================

AMQP Tools

v0.6.0(8y ago)07MITPHPPHP ^5.3.3|^7.0

Since Sep 2Pushed 8y ago6 watchersCompare

[ Source](https://github.com/softonic/Thumper)[ Packagist](https://packagist.org/packages/softonic/thumper)[ Docs](https://github.com/php-amqplib/Thumper)[ RSS](/packages/softonic-thumper/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (8)Used By (0)

Thumper
=======

[](#thumper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9ec13b2cc494b7560a3e16cdb16bfecdd60bddc31135acfcacd601b279b24e6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d616d71706c69622f7468756d7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-amqplib/Thumper)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/44eb768b9d2930a0e862995cee12ee68f59ec9568529c528a02aaa3747d12319/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d616d71706c69622f5468756d7065722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/php-amqplib/Thumper)[![Coverage Status](https://camo.githubusercontent.com/9cb59c4853e906272190697e38ca960542530f96608fd8d26a060a380b86f174/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7068702d616d71706c69622f5468756d7065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-amqplib/Thumper/code-structure)[![Quality Score](https://camo.githubusercontent.com/89509b20195535df9df855bf301edf657a9ae83474d114533e61d463b65d5f74/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7068702d616d71706c69622f5468756d7065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-amqplib/Thumper)[![Total Downloads](https://camo.githubusercontent.com/8384cf546fd6052b36e07f633938c0d7df72157ab1701f1e913b5c30af11e0ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d616d71706c69622f7468756d7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-amqplib/thumper)

Thumper is a PHP library that aims to abstract several messaging patterns that can be implemented over RabbitMQ.

Inside the *examples* folder you can see how to implement RPC, parallel processing, simple queue servers and pub/sub.

Install
-------

[](#install)

Via Composer

```
$ composer require php-amqplib/thumper
```

About the Examples
------------------

[](#about-the-examples)

Each example has a README.md file that shows how to execute it. All the examples expect that RabbitMQ is running. They have been tested using RabbitMQ 2.1.1

For example, to publish message to RabbitMQ is as simple as this:

```
	$producer = new Thumper\Producer($connection);
	$producer->setExchangeOptions(array('name' => 'hello-exchange', 'type' => 'direct'));
	$producer->publish($argv[1]);

```

And then to consume them on the other side of the wire:

```
	$myConsumer = function($msg)
	{
	  echo $msg, "\n";
	};

	$consumer = new Thumper\Consumer($connection);
	$consumer->setExchangeOptions(array('name' => 'hello-exchange', 'type' => 'direct'));
	$consumer->setQueueOptions(array('name' => 'hello-queue'));
	$consumer->setCallback($myConsumer); //myConsumer could be any valid PHP callback
	$consumer->consume(5); //5 is the number of messages to consume.

```

### Queue Server

[](#queue-server)

This example illustrates how to create a producer that will publish jobs into a queue. Those jobs will be processed later by a consumer –or several of them–.

### RPC

[](#rpc)

This example illustrates how to do RPC over RabbitMQ. We have a RPC Client that will send request to a server that returns the number of characters in the provided strings. The server code is inside the *parallel\_processing* folder.

### Parallel Processing

[](#parallel-processing)

This example is based on the RPC one. In this case it shows how to achieve parallel execution with PHP. Let's say that you have to execute two expensive tasks. One takes 5 seconds and the other 10. Instead of waiting 15 seconds, we can send the requests in parallel and then wait for the replies which should take 10 seconds now –the time of the slowest task–.

### Topic

[](#topic)

In this case we can see how to achieve publish/subscribe with RabbitMQ. The example is about logging. We can log with several levels and subjects and then have consumers that listen to different log levels act accordingly.

### Anonymous Consumers

[](#anonymous-consumers)

Also inside the *topic* folder there's an anonymous consumer example. The idea here is for those situations when you need to hook up a queue to some exchange to "spy" what's going on, but when you quit your program you want that the queue is automatically deleted. We can achieve this using an unnamed queue.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Disclaimer
----------

[](#disclaimer)

This code is experimental. The idea is to show how easy is to implement such patterns with RabbitMQ and AMQP.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.2% of commits — single point of failure

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 ~254 days

Recently: every ~375 days

Total

7

Last Release

3055d ago

PHP version history (2 changes)v0.3.0PHP &gt;=5.3.3

v0.4.1PHP ^5.3.3|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0d32fbf2a47dc28c1935adfc1c79c50d4b728eba55825377e549e934f1003a0?d=identicon)[devsoftonic](/maintainers/devsoftonic)

---

Top Contributors

[![videlalvaro](https://avatars.githubusercontent.com/u/30834?v=4)](https://github.com/videlalvaro "videlalvaro (41 commits)")[![zircote](https://avatars.githubusercontent.com/u/307960?v=4)](https://github.com/zircote "zircote (10 commits)")[![tamtamchik](https://avatars.githubusercontent.com/u/265510?v=4)](https://github.com/tamtamchik "tamtamchik (5 commits)")[![shrikeh](https://avatars.githubusercontent.com/u/445227?v=4)](https://github.com/shrikeh "shrikeh (4 commits)")[![tyx](https://avatars.githubusercontent.com/u/245494?v=4)](https://github.com/tyx "tyx (4 commits)")[![Sasha-Ch](https://avatars.githubusercontent.com/u/94524537?v=4)](https://github.com/Sasha-Ch "Sasha-Ch (3 commits)")[![postalservice14](https://avatars.githubusercontent.com/u/46067?v=4)](https://github.com/postalservice14 "postalservice14 (3 commits)")[![yahuarkuntur](https://avatars.githubusercontent.com/u/136878?v=4)](https://github.com/yahuarkuntur "yahuarkuntur (2 commits)")[![cgardner](https://avatars.githubusercontent.com/u/39611?v=4)](https://github.com/cgardner "cgardner (1 commits)")[![rigosv](https://avatars.githubusercontent.com/u/881687?v=4)](https://github.com/rigosv "rigosv (1 commits)")[![khepin](https://avatars.githubusercontent.com/u/455656?v=4)](https://github.com/khepin "khepin (1 commits)")[![ivaano](https://avatars.githubusercontent.com/u/190708?v=4)](https://github.com/ivaano "ivaano (1 commits)")[![foxwoods](https://avatars.githubusercontent.com/u/545212?v=4)](https://github.com/foxwoods "foxwoods (1 commits)")

---

Tags

libraryrabbitmqAMQPPHPAMQPLibThumper

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/softonic-thumper/health.svg)

```
[![Health](https://phpackages.com/badges/softonic-thumper/health.svg)](https://phpackages.com/packages/softonic-thumper)
```

###  Alternatives

[php-amqplib/thumper

AMQP Tools

276210.1k6](/packages/php-amqplib-thumper)[videlalvaro/thumper

AMQP Tools

27782.9k3](/packages/videlalvaro-thumper)[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.2k19.9M59](/packages/php-amqplib-rabbitmq-bundle)[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

2752.3M7](/packages/bschmitt-laravel-amqp)[ebeyrent/mopsy

AMQP Tools

171.4k](/packages/ebeyrent-mopsy)[mikemadisonweb/yii2-rabbitmq

Wrapper based on php-amqplib to incorporate messaging in your Yii2 application via RabbitMQ. Inspired by RabbitMqBundle for Symfony 2, really awesome package.

72258.5k1](/packages/mikemadisonweb-yii2-rabbitmq)

PHPackages © 2026

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