[Flow] Jobqueue.Common: Inject queue name?

Jacob Floyd cognifloyd at gmail.com
Tue Nov 11 23:01:27 CET 2014


Hey all,

Christopher Hlubek and Bastian Waidelich wrote most of TYPO3.Jobqueue.Common, but if anyone else has feedback that'd be great!

Currently, whenever you create a queue with one of the TYPO3.Jobqueue.* packages, you specify the queue name when you create a new queue object[1][2].

That works fine when the app developer also has control over the queue server, but, now I'm working towards integrating the TYPO3 Docs Rendering Hub app with the TYPO3 Community's Rabbitmq server. The problem is, that the server team has naming conventions for the queues, and in some cases, has predefined queues that I am supposed to use. I don't want to go back through the code and change everything that uses the queue names in the codebase (besides, the queue names make sense from the code base perspective).

So my question: What is the cleanest way to make the queue name configurable?

In YAML I'm imagining something like this (the ML/Forum will probably mangle the formatting, so I replaced spaces with periods):

TYPO3:
.Jobqueue:
...Common:
.....queues:
.......git:
.........className: '...'
.........queueName: 'org.typo3.docs.build.git'

I would like to make some standard way to do this that would work no matter which Queue implementation is in use. What do you think? Has anybody already done something like this? What do you want to see in the API of the Jobqueue packages?

Thanks,
Jacob Floyd

[1] Queue Constructor in TYPO3.Jobqueue.Redis
https://git.typo3.org/Packages/TYPO3.Jobqueue.Redis.git/blob/HEAD:/Classes/Queue/RedisQueue.php#l35
[2]  Queue Constructor in TYPO3.Jobqueue.Beanstalkd
https://git.typo3.org/Packages/TYPO3.Jobqueue.Beanstalkd.git/blob/HEAD:/Classes/TYPO3/Jobqueue/Beanstalkd/Queue/BeanstalkdQueue.php#l50
[3]  Queue Constructor in TYPO3.Jobqueue.Doctrine
https://github.com/mneuhaus/TYPO3.Jobqueue.Doctrine/blob/master/Classes/TYPO3/Jobqueue/Doctrine/Queue/DoctrineQueue.php#L49
[4]  Queue Constructor in TYPO3.Jobqueue.Rabbitmq
https://github.com/cognifloyd/TYPO3.Jobqueue.Rabbitmq/blob/master/Classes/TYPO3/Jobqueue/Rabbitmq/Queue/AbstractRabbitmqQueue.php#L61


More information about the Flow mailing list