Download the PHP package vadiktok/rabbitmq-elastica-bundle without Composer

On this page you can find all versions of the php package vadiktok/rabbitmq-elastica-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rabbitmq-elastica-bundle

RabbitMQ Elastica Bundle

As you probably know Elastica populate command is very slow and unstable.

This bundle provides simple functionality to populate Elastica indexes using RabbitMQ bundle

General idea was taken from Enqueue Elastica Bundle

Installation

1)

2) Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:

3) Define RabbitMQ producer and consumer in your app/config.yml file:

Usage

1) Run elastica populate command with --pager-persister option set to "rabbitmq"

Also you might want to use --max-per-page option. By default it is set to 100 and in my case 20k worked perfectly.

This command simply creates MQ messages with number of pages, amount of results and index name/type. Consumer takes care about fetching results and pushing into Elasticsearch server.

One page equals one message in queue. So if you have 1m records and set --max-per-page to 10k -- you will have 100 messages published.

2) Consume your messages with

The more consumers you run -- the faster your indexes will be populated. According to my experience reasonable amount of consumers is from 5 to 10.

Also I recommend to use SupervisorD for that.

Configuration

By default bundle will look at vadiktok_elastica producer and publish all messages to it. But you may also want to modify that name. In this case just add this into your config.yml file:

Or even more. Imagine you want to split your indexes into different queues. All you have to do is define your consumers/producers same that is described in Installation section and then tell the bundle which producer to use:

Now imagine you need your new data first instead of waiting to index data from the first record. All you have to do is to add "order" parameter:


All versions of rabbitmq-elastica-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
friendsofsymfony/elastica-bundle Version ^5.0
php-amqplib/rabbitmq-bundle Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vadiktok/rabbitmq-elastica-bundle contains the following files

Loading the files please wait ....