Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.8
-
None
Description
According to the JMS API documentation, the createQueue method should not create a physical queue in the broker.
Currently if just a queue name is passed, then the current implementation will create a queue if the destination is used by a consumer or producer.
Before this change was made in rev 964984, an AMQQueue object was created with durable true and a queue was created in the broker when the destination object was used by a consumer.
Therefore current behaviour is neither spec complaint nor backwards compatible.
Suggested improvement would be to just create a destination object with "create" set to "never". When a producer or consumer is created using this destination it will try to resolve if the queue is present, and if not will throw an exception.
Therefore the default behaviour would be spec compliant.
If a user needs to override this behaviour they could easily do so by specifying the correct create option (i.e one of receiver/sender/always).
A user could also use any valid addressing string to create a more customized destination as well.