Date: Thu, 28 Mar 2024 16:54:54 +0000 (UTC) Message-ID: <1707976438.17.1711644894025@7916a9e18d31> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_16_929458173.1711644894025" ------=_Part_16_929458173.1711644894025 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The image below shows that RabbitMQ is connected with Magento, if the qu= eue =E2=80=9Casync.operations.all=E2=80=9D does = not display as the image, that means RabbitMQ cannot = connect to Magento, please follow the instructions to install RabbitMQ&nb= sp;from Magento to configure it.
POS Enterprise Commerce >=3Dv4.8.0
=
POS Enterprise >=3Dv4.13.8
POS Pro Commerce >=3Dv4.5.0
POS Pro >=3Dv4.15.0
Read more: How to check your POS version from the backend, to know which v= ersion of Magestore POS you are using.
Open file app/etc/env.php
Find the key =E2=80=98cron_consumers_runner=E2=80=99 in the file
If there is no key =E2=80=98cron_consumers_runner=E2=80=99 in the file, = add the below config, place to the same level as the key =E2=80=98queue=E2= =80=99
=E2=80= =A6 'cron_consumers_runner' =3D> [ 'cron_run' =3D> true, 'max_messages' =3D> 0, 'consumers' =3D> [] ], =E2=80=A6
If the file already has the key =E2=80=98cron_consumers_runner=E2=80=99,=
and the array =E2=80=98consumers=E2=80=99 already has the val=
ue, then it needs magestore_pos_process_order.convert.=
consumer
to be appended to the end of the array.
Note: If there is no key =E2=80=98consumer= s=E2=80=99 or there is but an empty array, then no need to modify anything because by default all consumers are al= lowed.
=E2=80= =A6 'cron_consumers_runner' =3D> [ 'cron_run' =3D> true, 'max_messages' =3D> 0, 'consumers' =3D> [ 'async.operations.all', 'codegeneratorProcessor', 'product_action_attribute.update', 'product_action_attribute.website.update', 'exportProcessor', 'magestore_pos_process_order.convert.consumer' ] ], =E2=80=A6
Find the key =E2=80=98queue=E2=80=99 > =E2=80=98consumers_wait_for_me= ssages=E2=80=99 in the file, switch back to
0
, if not, add as below
=E2=80= =A6 'queue' =3D> [ 'consumers_wait_for_messages' =3D> 0, ], =E2=80=A6
Save the file
After editing it will look like the image below
Notes: See more suggestions from Magento
app/code/Magestore/Webp=
os/etc/queue.xml
Tag =E2=80=9Cbroker=E2=80=9D
Attribute =E2=80=9Cexchange=E2=80=9D change from =E2=80=9Cmagento-db=E2= =80=9D to =E2=80=9Cmagento=E2=80=9D
Attribute =E2=80=9Ctype=E2=80=9D change from =E2=80=9Cdb=E2=80=9D to =E2= =80=9Camqp=E2=80=9D
File content after being changed
<?xm= l version=3D"1.0"?> <!-- /** * Copyright =C2=A9 Magestore, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=3D"urn:magento:framework-message-queu= e:etc/queue.xsd"> <broker topic=3D"magestore_pos_process_order.convert.topic" exchange= =3D"magento" type=3D"amqp"> <queue name=3D"magestore_pos_process_order.convert.queue" consum= er=3D"magestore_pos_process_order.convert.consumer" consumerInstance=3D"Magento\Framework\MessageQueue\Consumer" handler=3D"Magestore\Webpos\Model\Checkout\PosOrder\Consumer= ::execute"/> </brok </config> , you may need to do some additional configuration as = below sesion in the Magento Backend.From the Admin Menu go to System &= gt; MageMojo > Cron Settings, edit the following fields:FIELDVALUEEXPLAI= NCron EnabledYes (Checked)Turn on MageMojo CronMaximum Cron Processes3= (If already a number greater than 3, keep it)Running multiple cron th= reads in parallel helps handle more workload (If set to 1, the convert orde= r thread has to wait for other threads to complete before it can be run, re= sulting in a long wait time for the conversion order).Consumers Job Timeout= 600 (If already a larger number, keep it)Avoid the order that is being= converted to be terminated, leading to the error that the shipment and pay= ment cannot be saved, because the timeout time is too short.Consumers Goven= orNo (UnChecked)Avoid MageMojo to terminate the conversion order proce= ss when the consumer is converting the order.Then click the =E2=80=9CSave= =E2=80=9D button.Settings after being changed3. Run commandsphp bin/magento= maintenance:enable php bin/magento cron:remove php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f -j 10 php bin/magento cache:flush php bin/magento cron:install php bin/magento maintenance:disable4. ResultAdvanced configurationBy defaul= t, the message queue will run single-thread, which that means, 1 consumer c= an only create 1 worker at a time. In case your transaction is too much, th= e worker will not be able to process it in time, leading to the converting = to Magento Order is slower because of the long queue. To solve this pr= oblem, Magestore POS has a mechanism to run multiple workers.Run the follow= ing command to change configphp bin/magento config:set --lock-env webpos/or= der_converter/number_of_thread_worker 3Run the following commands to apply = configphp bin/magento maintenance:enable php bin/magento cron:remove php bin/magento setup:upgrade php bin/magento cache:flush php bin/magento cron:install php bin/magento maintenance:disableThe number of workers refers to the tabl= e below