@@ -267,6 +267,16 @@ To configure Pulsar to use pulsar-relay, set the ``message_queue_url`` in
267267The ``http:// `` / ``https:// `` prefix tells Pulsar to use the proxy communication mode instead
268268of AMQP.
269269
270+ **Optional Topic Prefix **
271+
272+ You can optionally set a ``relay_topic_prefix `` to namespace your topics. This is useful
273+ when multiple independent Galaxy/Pulsar instance pairs share the same relay::
274+
275+ message_queue_url: http://proxy-server.example.org:9000
276+ message_queue_username: admin
277+ message_queue_password: your_secure_password
278+ relay_topic_prefix: production
279+
270280.. note ::
271281
272282 Unlike AMQP mode, the pulsar-relay mode does **not ** require the ``kombu ``
@@ -286,6 +296,8 @@ with proxy parameters::
286296 proxy_url: http://proxy-server.example.org:9000
287297 proxy_username: your_username
288298 proxy_password: your_secure_password
299+ # Optional topic prefix (must match Pulsar configuration)
300+ # relay_topic_prefix: production
289301
290302
291303 execution:
@@ -298,6 +310,11 @@ with proxy parameters::
298310 # Remote job staging directory
299311 jobs_directory: /data/pulsar/staging
300312
313+ .. note ::
314+
315+ The ``relay_topic_prefix `` must match on both Galaxy and Pulsar sides.
316+ If set on one side but not the other, messages will not be routed correctly.
317+
301318
302319Authentication
303320``````````````
@@ -368,18 +385,105 @@ In Galaxy's job configuration, route jobs to specific clusters using the
368385 manager: cluster_b
369386 # ... other settings
370387
388+ Multiple Galaxy/Pulsar Instance Pairs
389+ ``````````````````````````````````````
390+
391+ You can have multiple independent Galaxy and Pulsar instance pairs all sharing
392+ the same relay by using different topic prefixes. This is useful for:
393+
394+ * Running separate production and staging environments
395+ * Supporting multiple research groups with isolated instances
396+ * Multi-tenant deployments
397+
398+ **Example: Production and Staging Environments **
399+
400+ **Production Pulsar ** (``app.yml ``)::
401+
402+ message_queue_url: https://shared-relay:9000
403+ message_queue_username: admin
404+ message_queue_password: password
405+ relay_topic_prefix: production
406+ managers:
407+ cluster_a:
408+ type: queued_slurm
409+
410+ **Staging Pulsar ** (``app.yml ``)::
411+
412+ message_queue_url: https://shared-relay:9000
413+ message_queue_username: admin
414+ message_queue_password: password
415+ relay_topic_prefix: staging
416+ managers:
417+ cluster_a:
418+ type: queued_slurm
419+
420+ **Production Galaxy ** (``job_conf.yml ``)::
421+
422+ runners:
423+ pulsar:
424+ load: galaxy.jobs.runners.pulsar:PulsarMQJobRunner
425+ proxy_url: https://shared-relay:9000
426+ proxy_username: admin
427+ proxy_password: password
428+ relay_topic_prefix: production
429+
430+ execution:
431+ environments:
432+ pulsar_jobs:
433+ runner: pulsar
434+ manager: cluster_a
435+ # ... other settings
436+
437+ **Staging Galaxy ** (``job_conf.yml ``)::
438+
439+ runners:
440+ pulsar:
441+ load: galaxy.jobs.runners.pulsar:PulsarMQJobRunner
442+ proxy_url: https://shared-relay:9000
443+ proxy_username: admin
444+ proxy_password: password
445+ relay_topic_prefix: staging
446+
447+ execution:
448+ environments:
449+ pulsar_jobs:
450+ runner: pulsar
451+ manager: cluster_a
452+ # ... other settings
453+
454+ In this setup, the topics will be completely isolated:
455+
456+ * **Production **: ``production_job_setup_cluster_a ``, ``production_job_status_update_cluster_a ``
457+ * **Staging **: ``staging_job_setup_cluster_a ``, ``staging_job_status_update_cluster_a ``
458+
371459Topic Naming
372460````````````
373461
374- Messages are organized by topic with automatic naming based on the manager name:
462+ Messages are organized by topic with automatic naming based on the optional prefix
463+ and manager name:
464+
465+ * Job setup: ``job_setup `` (default manager, no prefix)
466+ * Job setup: ``job_setup_{manager_name} `` (named manager, no prefix)
467+ * Job setup: ``{prefix}_job_setup `` (default manager, with prefix)
468+ * Job setup: ``{prefix}_job_setup_{manager_name} `` (named manager, with prefix)
469+
470+ The same pattern applies to other message types:
471+
472+ * Status requests: ``job_status_request ``, ``job_status_request_{manager_name} ``
473+ * Kill commands: ``job_kill ``, ``job_kill_{manager_name} ``
474+ * Status updates: ``job_status_update ``, ``job_status_update_{manager_name} ``
475+
476+ When a ``relay_topic_prefix `` is configured, it is prepended to all topic names:
477+
478+ * ``production_job_setup ``
479+ * ``production_job_setup_cluster_a ``
480+ * ``production_job_status_update_cluster_a ``
375481
376- * Job setup: ``job_setup_{manager_name} `` or ``job_setup `` (for default manager)
377- * Status requests: ``job_status_request_{manager_name} ``
378- * Kill commands: ``job_kill_{manager_name} ``
379- * Status updates: ``job_status_update_{manager_name} ``
482+ This allows:
380483
381- This allows multiple Pulsar instances to share the same proxy without message
382- conflicts.
484+ * Multiple Pulsar instances to share the same relay (using different manager names)
485+ * Multiple independent Galaxy/Pulsar instance pairs to share the same relay
486+ (using different topic prefixes)
383487
384488Comparison with AMQP Mode
385489``````````````````````````
0 commit comments