activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Botiza <Cristian.Bot...@endava.com>
Subject RE: Messages stuck in the queue
Date Mon, 29 Mar 2010 12:50:26 GMT
Ok,
My configuration is this:

In the MDB ActivationSpec:
maxSessions=1 (I really need to process messages one at a time)
maxMessagesPerSessions=1 (not sure about this one)

In the JMS Queue resource adapter:
I'm using the defaults, so QueuePrefetch is 1000

I'm sending TextMessages from a remote Java (client) app. The behavior is this: my MDB is
not called at all.

I see this in the AMQ logs:

[PrefetchSubscription] Prefetch limit.

I assume I would need to set maxMessagesPerSessions to something higher? Say 1000 to match
the QueuePrefetch setting in the RA?

The above message could mean that the prefetch limit of 1 has been met and no message delivery
happens?
I'm using auto acknowledge so I assume I don't have to call acknowledge on the message in
the MDB.

Could someone provide some guidance?

Thank you

________________________________________
From: Rob Davies [rajdavies@gmail.com]
Sent: 26 March 2010 20:26
To: users@activemq.apache.org
Subject: Re: Messages stuck in the queue

catching Throwable would be best. You wouldn't need to redeploy the JMS queue - just restart
the client should do
On 26 Mar 2010, at 16:40, Cristian Botiza wrote:

> When you say 'you miss an ack somewhere'...does this mean onMessage() throws an exception?
>
> I've had this problem before, I added a try/catch (Exception e) to make sure no exception
gets out of onMessage(), should I use catch(Throwable) instead?
>
> I'm not calling message.acknowledge(), the container should do - I assume.
>
> Anyways, supposing there was a throwable that made it out of onMessage() it basically
means no other message will be dispatched and I have to redeploy the JMS queue in the app
server?
>
> Thank you
>
> ________________________________________
> From: Gary Tully [gary.tully@gmail.com]
> Sent: 26 March 2010 18:26
> To: users@activemq.apache.org
> Subject: Re: Messages stuck in the queue
>
> you are using a prefetch of 1 (this sum of maxSessions,
> maxMessagesPerSessions ) and possibly u miss an ack somewhere and no
> dispatch happens. Possibly using maxSessions=1
> and maxMessagesPerSessions =100 may help. so that you get a prefetch of 100.
>
>
> On 26 March 2010 15:18, Cristian Botiza <Cristian.Botiza@endava.com> wrote:
>
>> Hi all,
>>
>> I'm using an activation spec where maxSessions=maxMessagesPerSessions=1.
>> Using a client application I'm sending a TextMessage to the queue
>>
>> The MDB consumes some messages and then the messages start piling up in the
>> queue and never get dispatched.
>> I restarted the server, redeployed the application but no message is
>> dispatched anymore.
>>
>> I'm using ActiveMQ 4.1.2 as embeded in Apache Geronimo 2.1.1.2 (and can't
>> change it).
>> I'm using maxSessions=1 as the message is really a notification and wanted
>> to avoid processing the same notification concurrently.
>>
>> Do you have any suggestions? This is really a blocker now.
>>
>> Thank you
>> Cristian
>>
>> The information in this email is confidential and may be legally
>> privileged. It is intended solely for the addressee. Any opinions expressed
>> are mine and do not necessarily represent the opinions of the Company.
>> Emails are susceptible to interference. If you are not the intended
>> recipient, any disclosure, copying, distribution or any action taken or
>> omitted to be taken in reliance on it, is strictly prohibited and may be
>> unlawful. If you have received this message in error, do not open any
>> attachments but please notify the EndavaIT Service Desk on (+44 (0)870 423
>> 0187), and delete this message from your system. The sender accepts no
>> responsibility for information, errors or omissions in this email, or for
>> its use or misuse, or for any act committed or omitted in connection with
>> this communication. If in doubt, please verify the authenticity of the
>> contents with the sender. Please rely on your own virus checkers as no
>> responsibility is taken by the sender for any damage rising out of any bug
>> or virus infection.
>>
>> Endava Limited is a company registered in England under company number
>> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
>> 1AR, United Kingdom. Endava Limited is the Endava group holding company and
>> does not provide any services to clients. Each of Endava Limited and its
>> subsidiaries is a separate legal entity and has no liability for another
>> such entity's acts or omissions. Please refer to the “Legal” section on our
>> website for a list of legal entities.
>>
>
>
>
> --
> http://blog.garytully.com
>
> Open Source Integration
> http://fusesource.com
>
> The information in this email is confidential and may be legally privileged. It is intended
solely for the addressee. Any opinions expressed are mine and do not necessarily represent
the opinions of the Company. Emails are susceptible to interference. If you are not the intended
recipient, any disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it, is strictly prohibited and may be unlawful. If you have received this message
in error, do not open any attachments but please notify the EndavaIT Service Desk on (+44
(0)870 423 0187), and delete this message from your system. The sender accepts no responsibility
for information, errors or omissions in this email, or for its use or misuse, or for any act
committed or omitted in connection with this communication. If in doubt, please verify the
authenticity of the contents with the sender. Please rely on your own virus checkers as no
responsibility is taken by the sender for any damage rising out of any bug or virus infection.
>
> Endava Limited is a company registered in England under company number 5722669 whose
registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava Limited
is the Endava group holding company and does not provide any services to clients. Each of
Endava Limited and its subsidiaries is a separate legal entity and has no liability for another
such entity's acts or omissions. Please refer to the “Legal” section on our website for
a list of legal entities.

Mime
View raw message