Hi,

On Wed, Jun 19, 2013 at 1:21 PM, Shammi Jayasinghe <sha...@wso2.com> wrote:

> Hi Ishara,
>
> Yes, We are unable to support dynamic queues with AMQP 0-91 version.
> Because of that problem we have solved this issue in a different way.[1].
> If you get the latest JMS transport library in to the App Server, it should
> fix the problem of defining queue name in the jndi.properties file of the
> server. We have
> discussed this problem and the feasible solution in the mail thread "ESB
> and MB integration"
>

Just wondering whether having dynamic queue support alone would be the best
resolution upon this problem. Of course the problems occurred due to not
having proper JMS configurations would be resolved but without creating
queues for each deployed service regardless whether they need to be exposed
via JMS, can't we introduce a construct to specify the transports (similar
to that of ESB proxy services) through which the services are exposed and
make http and https the defaults?


>
> Thanks
> Shammi
>
> [1]https://wso2.org/jira/browse/CARBON-14108
>
>
>
> On Wed, Jun 19, 2013 at 1:07 PM, Ishara Premadasa <ish...@wso2.com> wrote:
>
>> Hi,
>>
>> I am trying to integrate MB 2.1.0 with AS 5.1.0 in order to enable a
>> sample service deployed in App Server to be subscribed and receive messages
>> from a queue/topic registered in MB [1]. However when doing this there are
>> practical limitations in this scenario which makes it not useful to
>> integrate MB with App Server.
>>
>> As WSO2 MB currently do not have dynamic Queues/Topics support, it can't
>> dynamically create destinations when they are not defined in the JNDI
>> Initial Context. Once the JMS transport is enabled in App Server it tries
>> to create a JMS Queue for each deployed service in AS at the start up. As
>> there are no jms queues defined in jndi.properties file for these start up
>> services (except for the sample service which we going to use with MB) App
>> Server fails to start in this case and loops the following error in the
>> console.
>>
>> [2013-06-19 12:49:39,965]  INFO
>> {org.apache.axis2.transport.jms.ServiceTaskManager} -  Task manager for
>> service : JavaScriptStubGeneratorService [re-]initialized
>> [2013-06-19 12:49:39,985]  WARN {org.apache.axis2.transport.jms.JMSUtils}
>> -  Cannot locate destination : JavaScriptStubGeneratorService
>> [2013-06-19 12:49:39,993] ERROR
>> {org.apache.axis2.transport.base.threads.NativeWorkerPool} -  Uncaught
>> exception
>> java.lang.UnsupportedOperationException: The new addressing based sytanx
>> is not supported for AMQP 0-8/0-9 versions
>>     at
>> org.wso2.andes.client.AMQSession_0_8.handleAddressBasedDestination(AMQSession_0_8.java:572)
>>     at
>> org.wso2.andes.client.AMQSession.registerConsumer(AMQSession.java:2838)
>>     at org.wso2.andes.client.AMQSession.access$500(AMQSession.java:117)
>>     at org.wso2.andes.client.AMQSession$4.execute(AMQSession.java:2031)
>>     at org.wso2.andes.client.AMQSession$4.execute(AMQSession.java:1997)
>>     at
>> org.wso2.andes.client.AMQConnectionDelegate_8_0.executeRetrySupport(AMQConnectionDelegate_8_0.java:305)
>>     at
>> org.wso2.andes.client.AMQConnection.executeRetrySupport(AMQConnection.java:621)
>>     at
>> org.wso2.andes.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
>>     at
>> org.wso2.andes.client.AMQSession.createConsumerImpl(AMQSession.java:1995)
>>     at
>> org.wso2.andes.client.AMQSession.createConsumer(AMQSession.java:993)
>>     at
>> org.apache.axis2.transport.jms.JMSUtils.createConsumer(JMSUtils.java:642)
>>     at
>> org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.createConsumer(ServiceTaskManager.java:871)
>>     at
>> org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.getMessageConsumer(ServiceTaskManager.java:741)
>>     at
>> org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.receiveMessage(ServiceTaskManager.java:498)
>>     at
>> org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:420)
>>     at
>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>     at java.lang.Thread.run(Thread.java:662)
>>
>>
>>
>> Therefore if we are going to integrate MB into AS need to do one of the
>> below two configuration options.
>>
>> 1. Go through all other deployed services in AS and modify the
>> services.xml file in order to only listen via http,https transports.
>> 2. Go through all other deployed services in AS and add a corresponding
>> queue name to jndi.properties file with each service name.
>>
>> Any option of this two is not feasible and not acceptable in user's
>> perspective as well as AS server will fail immediately if there is new
>> service is deployed on the run. Is there any way whether we can only enable
>> the JMS transport for a selected service only?
>>
>> In side note Apache ActiveMQ provides dynamic queue/topic support, [2]
>> so AS starts fine with ActiveMQ while ActiveMQ creates a queue in the
>> broker for each deployed service in AS. Hence as a workaround this can be
>> get worked if MB adds dynamic queue support, however the correct solution
>> would be add a configuration to enable/disable JMS transport in services,
>> as it is done in ESB proxy services.
>>
>> Thanks!
>> Ishara
>>
>>  [1] https://wso2.org/jira/browse/MB-238
>>  [2] http://activemq.apache.org/how-do-i-create-new-destinations.html
>>
>> --
>> Ishara Premasada
>> Software Engineer,
>> WSO2 Inc. http://wso2.com/
>> *Blog   :  http://isharapremadasa.blogspot.com/
>> Twitter       :  https://twitter.com/ishadil
>> Mobile       : +94 714445832*
>>
>>
>>
>
>
> --
> Best Regards,*
>
> Shammi Jayasinghe*
> Associate Tech Lead
> WSO2, Inc.; http://wso2.com,
> mobile: +94 71 4493085
>
>
> _______________________________________________
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>

Regards,
Prabath
-- 
Prabath Abeysekara
Associate Technical Lead, Data TG.
WSO2 Inc.
Email: praba...@wso2.com <harsha...@wso2.com>
Mobile: +94774171471

<http://harshana05.blogspot.com/>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to