users@genericjmsra.java.net

Re: Reconnect behaviour from MDB to Sun MQ

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Fri, 03 Feb 2006 09:40:27 +0530

Hi Donald

>>> capability. Is there an option to ask either the application server
>>> or the generic ra to attempt a reconnect? If so how should this be
>>> configured?
Reconnect for inbound connections is currently supported in Generic RA
for JMS. [ie Inbound connections will be destroyed and reconnected, if
the connection that receives the messages fails] Refer to the
reconnectAttempts and reconnectInterval property in the user guide [1].
This feature depends on the exceptionListener support of the MQ client
library though.

Thanks
--Siva.
[1] https://genericjmsra.dev.java.net/docs/userguide/userguide.html

George Tharakan wrote:
> Routing to - users_at_genericjmsra.dev.java.net - where genericjmsra users
> can chime in.
>
> -G
>
> Mark Williams wrote:
>
>> At 10:49 AM 2/2/2006, Donald Forbes wrote:
>>
>>> Hi gurus,
>>>
>>> I have done some initial testing to try out a failure scenario with a
>>> broker failing then restarting using an MDB in the application server
>>> as the consumer.
>>>
>>> i.e. MDB application deployed in AS8 connecting to Sun MQ (3.6 SP3)
>>> via generic ra (1.5 RC1).
>>>
>>> From the first test I have done I load up the queue with 1000
>>> messages then enable the MDB application. This starts to consume
>>> messages from the broker then I shutdown the broker. I see that the
>>> MDB continues processing messages for quite a while, this I assume is
>>> due to the fact that the iMQ client runtime buffers a configured
>>> number of messages.
>>> (Ignoring any questions about transactions at the moment.) I then
>>> restart the broker and wait. It seems that I can wait forever as
>>> there is no attempt to reconnect to the broker and continue
>>> processing messages.
>>>
>>> With AS7 this was not a problem because the app server would attempt
>>> to reconnect (by default once a minute for 60 attempts) however this
>>> behaviour does not seem to have been transferred over to AS8.
>>>
>>> There are configuration options for Sun MQ about reconnecting which I
>>> will experiment with, however, other JMS providers may not have this
>>> capability. Is there an option to ask either the application server
>>> or the generic ra to attempt a reconnect? If so how should this be
>>> configured?
>>>
>>> Many thanks
>>>
>>>
>>>
>>> Donald
>>
>>
>> Well, I'm no guru on Generic RA, having just now started trying to use
>> it.
>>
>> However I know there are Generic RA deployment settings you can add to
>> the application to adjust it's behavior.
>> Check out the website for documentation. (some seem intuitive)
>> https://genericjmsra.dev.java.net
>>
>> I've found that a application can consume hundreds of messages off a
>> waiting queue in a matter of seconds. Actually processing or *doing
>> something* with those messages can take longer.
>>
>>
>> <PRE>
>>
>>
>> <mdb-resource-adapter>
>> <resource-adapter-mid>genericra</resource-adapter-mid>
>> <activation-config>
>> <activation-config-property>
>>
>> <activation-config-property-name>DestinationType</activation-config-property-name>
>>
>>
>> <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
>>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>DestinationProperties</activation-config-property-name>
>>
>>
>> <activation-config-property-value>imqDestinationName=Queue</activation-config-property-value>
>>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>MaxPoolSize</activation-config-property-name>
>>
>>
>> <activation-config-property-value>32</activation-config-property-value>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>RedeliveryAttempts</activation-config-property-name>
>>
>>
>> <activation-config-property-value>0</activation-config-property-value>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>ReconnectAttempts</activation-config-property-name>
>>
>>
>> <activation-config-property-value>4</activation-config-property-value>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>ReconnectInterval</activation-config-property-name>
>>
>>
>> <activation-config-property-value>10</activation-config-property-value>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>RedeliveryInterval</activation-config-property-name>
>>
>>
>> <activation-config-property-value>1</activation-config-property-value>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>SendBadMessagesToDMD</activation-config-property-name>
>>
>>
>> <activation-config-property-value>false</activation-config-property-value>
>>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>DeadMessageDestinationClassName</activation-config-property-name>
>>
>>
>> <activation-config-property-value>com.sun.messaging.Queue</activation-config-property-value>
>>
>> </activation-config-property>
>> <activation-config-property>
>>
>> <activation-config-property-name>DeadMessageDestinationProperties</activation-config-property-name>
>>
>>
>> <activation-config-property-value>imqDestinationName=DMDtest</activation-config-property-value>
>>
>> </activation-config-property>
>> </activation-config>
>> </mdb-resource-adapter>
>>
>>
>> </PRE>
>> Read/link to my blog at Sun Microsystems:
>> http://blogs.sun.com/roller/page/fireman
>>
>