diff --git a/api/config_sample.php b/api/config_sample.php index 8ea01cf6f..2f03969ae 100644 --- a/api/config_sample.php +++ b/api/config_sample.php @@ -128,12 +128,12 @@ $enabled_container_types = array(); # Zocalo message broker credentials - Set to empty string to disable - $zocalo_server = 'tcp://activemq.server.ac.uk'; - $zocalo_username = 'foo'; - $zocalo_password = 'bar'; - - # Primary Zocalo entry point for recipe submission - $zocalo_mx_reprocess_queue = '/queue/zocolo.name'; + $rabbitmq_zocalo_host = 'rabbitmq.server.ac.uk'; + $rabbitmq_zocalo_port = 5672; + $rabbitmq_zocalo_username = 'foo'; + $rabbitmq_zocalo_password = 'bar'; + $rabbitmq_zocalo_vhost = 'zocalo'; + $rabbitmq_zocalo_routing_key = 'processing_recipe'; # This is used to trigger Zocalo recipes on adding new Protein sequences # Set to empty string to disable diff --git a/api/src/Page.php b/api/src/Page.php index f098868f9..8c073cd83 100644 --- a/api/src/Page.php +++ b/api/src/Page.php @@ -1093,9 +1093,9 @@ function get_visit_processed_dir($dc, $location) function _submit_zocalo_recipe($recipe, $parameters, $error_code = 500) { - global $zocalo_mx_reprocess_queue; + global $rabbitmq_zocalo_vhost; - if (isset($zocalo_mx_reprocess_queue)) + if (isset($rabbitmq_zocalo_vhost)) { // Send job to processing queue $zocalo_message = array( @@ -1104,7 +1104,7 @@ function _submit_zocalo_recipe($recipe, $parameters, $error_code = 500) ), 'parameters' => $parameters, ); - $this->_send_zocalo_message($zocalo_mx_reprocess_queue, $zocalo_message, $error_code); + $this->_send_zocalo_message($rabbitmq_zocalo_vhost, $zocalo_message, $error_code); } } @@ -1130,7 +1130,6 @@ function _send_zocalo_message($rabbitmq_zocalo_vhost, $zocalo_message, $error_co try { - error_log("Sending message" . var_export($zocalo_message, true)); $queue = new Queue($rabbitmq_zocalo_host, $rabbitmq_zocalo_port, $rabbitmq_zocalo_username, $rabbitmq_zocalo_password, $rabbitmq_zocalo_vhost); $queue->send($zocalo_message, $rabbitmq_zocalo_routing_key); }