Hi Amila,
The relationship between dynamic queue support of the Message Broker and
the requirement to declare
queue name in the jndi.properties file of ESB is some thing different.
Though we had dynamic queue support in MB 1.x versions, still we had to
declare the queue name in the jndi.properties file of ESB. That was
according to the implementation of the axis2 jms transport.
In JMS transport implementation, first it do a lookup in the initial
context for a queue name and if it does not found it will throw a name not
found exception. In that catch block, it try to do a look up by adding
"dynamicQueue/" prefix to the destination as bellow;
* public static Destination lookupDestination(Context context, String
destinationName,*
* String destinationType)
throws NamingException {*
*
*
* if (destinationName == null) {*
* return null;*
* }*
*
*
* try {*
* return JMSUtils.lookup(context, Destination.class,
destinationName);*
* } catch (NameNotFoundException e) {*
* try {*
* return JMSUtils.lookup(context, Destination.class,*
*
(JMSConstants.DESTINATION_TYPE_TOPIC.equalsIgnoreCase(destinationType) ?*
* "dynamicTopics/" : "dynamicQueues/") +
destinationName);*
* } catch (NamingException x) {*
* log.warn("Cannot locate destination : " + destinationName);
*
* throw x;*
* }*
* } catch (NamingException e) {*
* log.warn("Cannot locate destination : " + destinationName, e);*
* throw e;*
* }*
* }*
*
*
So As we know, we have this kind of a dynamic queue declaration support in
ActiveMQ [1]. Because of that using this JMS transport implementation , it
is possible to create queues in ActiveMQ though they are not defined in the
jndi.properties file. But if we are using other JMS brokers, there dynamic
queue declaration scenario is some thing different from the way for
ActiveMQ. *
*
As Danushka mentioned we had dynamic queue support in MB 1.x versions. In
that we created those queues as follows.
*
*
* Queue queue = queueSession.createQueue(queueName + ";{create:always,
node:{durable: True}}");*
Currently we do not have that support in MB 2.x version due to a AMQP
protocol version (0.91) limitation and we will work on to provide that.
Any how though we provide dynamic queue creation support in the above way,
we ll have to change the JMS transport to achieve above mentioned
requirement and it should do the queue declaration according to the broker.
I ll send a separate mail on that to architecture list on changing the jms
transport implementation to provide dynamic queue support with MB 2.x ,
once we able to provide that support for MB 2.x versions.
Thanks
Shammi
[1]http://activemq.apache.org/jndi-support.html
On Mon, Apr 22, 2013 at 9:46 AM, Amila Maha Arachchi <[email protected]>wrote:
> Hi Shammi,
>
> When we try to integrate ESB with MB 2.0.x, if we want to send messages to
> a queue in MB, we need to have an entry in the jndi.properties file. But in
> MB 1.x, AFAIR it supported dynamicQueue property. Editing the
> jndi.properties file means we need to restart the ESB which is not good in
> a production env (If we want to add a new proxy with a JMS endpoint we need
> to restart the ESB).
>
> I thought of bringing this up because you guys are working on MB 2.1.x
> release these days. Is this something which can be fixed?
>
> Regards,
> AmilaM.
>
> --
> *Amila Maharachchi*
> Technical Lead
> Member, Management Committee - Cloud & Platform TG
> WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>
--
Best Regards,*
Shammi Jayasinghe*
Senior Software Engineer; WSO2, Inc.; http://wso2.com,
mobile: +94 71 4493085
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev