It depends on the provider, but in most cases you will not know until you create a session type, such as session.createConsumer. Simply creating a consumer in this way will not consume any messages until you receive the receipt. And this is where the behavior can change from provider to provider and server configuration.
For example, using ActiveMQ, if there are no permissions blocking the user you are connecting to, a queue is created automatically when creating a session type.
Using WebSphere MQ, the queue must be defined by the administrator. If it does not exist, the queue manager returns an exception with reason code 2085 (UNKNOWN_OBJECT_NAME).
In addition, you will need to find out if a particular provider has access to the queue list. Using the examples above, ActiveMQ you can get the list of queues using JMX using WebSphere MQ, you can do this if you have permission to send PCF commands to the queue manager.
source share