TorqueBox.fetch is described in the documentation as the correct way to obtain all resources in TorqueBox post 3.0.0, but it fails in some cases where the expected behaviour is success.
Given I have a torquebox YAML file defining two queues:
where DLQ is the system standard dead letter queue defined in $TORQUEBOX_HOME/standalone/configuration/standalone.xml
The following code demonstrates aberrant behaviour:
The failure message above is
Injected service failed to start - service jboss.deployment.unit."app-knob.yml".jboss.naming.context.java.queue.DLQ.manager.live
However, the following code works:
This is nonsensical - if I can fetch one queue with TorqueBox.fetch I should be able to fetch all queues with it, DLQ and Expiry Queue included. The documentation does state that destinations are expected to begin with /queue or /topic, but given that TorqueBox::Messaging::Queue.new('DLQ') functions and generates a working queue reference, TorqueBox.fetch('DLQ') should also do so for consistency.