DiamondLightSource/SynchWeb

AMPQ vs STOMP for reprocessing

Opened this issue · 2 comments

It seems that efforts are underway over in python-zocalo land to start using RabbitMQ with the AMQP protocol rather than ActiveMQ with the STOMP protocol. To this end I have installed RabbitMQ in the hopes of triggering reprocessing jobs from SynchWeb. However, SynchWeb is still using STOMP protocol as evidenced by the dependency on

"stomp-php/stomp-php": "3.0.6"

in the composer.json and the use of Stomp in api/src/Queue.php

So this should be simple enough... just switch over to the php-ampqlib library and rewrite api/src/Queue.php. Unfortunately it appears that php-ampqlib does not support PHP5, which at this point seems to be a requirement for running SynchWeb..... so what to do?

Maybe there is a way to configure RabbitMQ to accept Stomp messages? OR perhaps making the changes in SynchWeb that would be needed to allow use of PHP>=7.4?

An alternative is to modify api/src/Queue.php to publish messages using RabbitMQ’s HTTP API. For example:

Sending a RabbitMQ message with JSON payload using curl
https://dev.to/valanto/sending-a-rabbitmq-message-with-json-payload-using-curl-3l4k

We are now using PHP7.3 if that helps...