Download the PHP package bimbus/mq-client-akeneo without Composer
On this page you can find all versions of the php package bimbus/mq-client-akeneo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bimbus/mq-client-akeneo
More information about bimbus/mq-client-akeneo
Files in bimbus/mq-client-akeneo
Package mq-client-akeneo
Short Description A simple Pub/Sub MQ client to publish Akeneo products changes
License Apache-2.0
Informations about the package mq-client-akeneo
MQ Client for Akeneo
A Message Queue bundle for the Akeneo PIM
Principle
This simple bundle allows to push a message to a Google Cloud Pub/Sub topic each time a product is modified.
Use case
Combined with other services orchestrated from an ESB, this allows to asynchronously process changes (BLOB for examples) and push them back to the PIM or to any other application (catalog, etc)
We use this in a BIM environment to parse ArchiCAD 3D .gsm model files and inject the PIM data to generate up to date versions of 3D furniture libraries.
Installation
From your PIM project root folder, clone the repository:
git clone https://github.com/bimbus/mq-client-akeneo src/Bimbus
Then add the needed dependencies:
composer require google/cloud-pubsub
Edit the app/AppKernel.php
file to reflect this:
Empty your cache:
bin/console cache:clear --env=prod
Google Cloud Pub/Sub
Select or create the project. If this is a creation, activate the Pub/sub API.
Create a service account
- Select the
IAM & admin > Service accounts
menu item then click on CREATE SERVICE ACCOUNT. - Type in a name for the new service account (eg. akeneo-mq) and check the Furnish a new private key checkbox.
- Click on "CREATE", the JSON credentials file should be downloaded automatically.
- Rename the downloaded file to
gcp-credentials.json
and put it in thesrc/Bimbus/config
folder.
Create a topic
- Go to the
Pub/Sub > Topics
menu and then click on CREATE TOPIC. - On the next screen, select the newly created topic.
- Then, type in the name of the new service account your just created and give it the "Pub/Sub Publisher" Role.
Create a subscription
- Return to the
Pub/Sub > Topics
menu. - Click the button at the end of the created topic line and select New subscription.
- Enter a name and click on create.
Bundle configuration
- Move into the
src/Bimbus/Bundle/MQBundle/Resources/config/
folder. - Copy the
parameters.yml.dist
toparameters.yml
. - Edit the
parameters.yml
file to fill in thegcp.pubsub.project
andgcp.pubsub.topic
keys:
Test everything
- Open the Akeneo UI and edit a product to check that saving works fine.
- Use the
gcloud
CLI to check that the message as been pushed to the topic: