ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » creating temporary queues

Post new topic  Reply to topic
 creating temporary queues « View previous topic :: View next topic » 
Author Message
pikoplop
PostPosted: Mon Dec 29, 2014 5:37 am    Post subject: creating temporary queues Reply with quote

Newbie

Joined: 29 Dec 2014
Posts: 3

Hi I am using activeMq dynamic queues in my broker application.
I want to switch to WMQ temporary queues and want to know if there is an analogy beetween the two.

Firstly I have got my bindings file as JNDI provider. In this file I set my connectionfactory to use model queue made to generate temporary queues with some prefix.
The prefix is ex. dynamicQueues/*.

Then I set in first application flow
destinationQueueName to
dynamicQueues/queue1 and
sourceQueueName in second flow to the same
dynamicQueues/queue1.
The problem is there is no dynamicQueues/queue1 in the bindings file.

I would like it to be created on the fly by connection factory from the bindings file when I will be requesting it using dynamicQueues prefix.

Is it possible or we have to create dynamic queues manually by using an api?
Can the jndi object be created when not present in bindings file but requested using only proper connectionfactory configuration?

Pawel
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Dec 29, 2014 6:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

You seem to be gravely mistaken as to the naming conventions.
A dynamic queue created off the model queue will always look something like this:
Code:
queue://qmgrname/prefixname.somenumber


So unless your queue manager name is (case sensitive) dynamicQueues your set up is totally wrong.

Also dynamic queues are being created by the program. I.E. if you are not passing the name of the queue from the creator to the user piece of code you have no way of knowing the queue name.

Session.CreateTemporaryQueue() is the way to create such a queue.
See https://javaee-spec.java.net/nonav/javadocs/javax/jms/Session.html#createTemporaryQueue%28%29

Now if you need to dynamically access an existing queue that is not defined in JNDI you can use the following URI form:
Code:
Session.createQueue("queue://QMGR/QNAME?attribute=value&attribute=value..."


If the queue manager name if not filled in ("queue:///QNAME") the queue manager you are connected to is assumed, unless name resolution points to a cluster queue.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
pikoplop
PostPosted: Fri Jan 02, 2015 1:00 am    Post subject: Reply with quote

Newbie

Joined: 29 Dec 2014
Posts: 3

Ok thanks for clarification.
But I wonder if there is a way to force qm to create dynamicQueue without explicitly calling Session.CreateTemporaryQueue() ?
I mean to only have destinationQueueName set and if not present in JNDI let the qm create it for you using some template.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Jan 03, 2015 12:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

pikoplop wrote:
Ok thanks for clarification.
But I wonder if there is a way to force qm to create dynamicQueue without explicitly calling Session.CreateTemporaryQueue() ?
I mean to only have destinationQueueName set and if not present in JNDI let the qm create it for you using some template.


Your problem seems to be manyfold here.
Defining a destination that is not in JNDI => I already told you to use the URI form...
Defining / creating a destination that does not exist on the qmgr => This should really be an administrative task and there are programs / interfaces to do that.

To create such a queue dynamically you might need to have a qcf with a model queue that does create a permanent queue .... But again as I said this should be an administrative set up and the user program should not do anything with the setup of queues.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » creating temporary queues
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.