You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "allen.lau" <gu...@gmail.com> on 2009/08/19 04:10:32 UTC

JMSExceptions from jms component?

Hi,  I'm testing out the jms component using a route like so:

  <camelContext id="producer" trace="true"
xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="file:src/data?noop=true"/>
            <loop>
                <constant>200</constant>
                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
            </loop>
            <stop/>
        </route>
    </camelContext>

I have also configured the activeMQ broker to fail send if no space using
the option:  <systemUsage sendFailIfNoSpace="true">

What I was hoping to achieve is to capture the exception that is thrown from
ActiveMQ in the Camel route and retry accordingly.   It seems though that
the Camel route never sees the exception.

Is my understanding incorrect or is this a bug in Camel?  I'm using 2.0-M3
and ActiveMQ 5.2.0 in my tests.

Thanks,
Allen
-- 
View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMSExceptions from jms component?

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Aug 31, 2009 at 10:56 PM, allen.lau<gu...@gmail.com> wrote:
>
>
>
> Claus Ibsen-2 wrote:
>>
>> On Wed, Aug 19, 2009 at 7:57 PM, allen.lau<gu...@gmail.com> wrote:
>>>
>>> Claus,  you are right, I had to set "alwaysSynSend=true" in
>>> ActiveMQConnectionFactory to see the exception.
>>>
>>> Now it is a matter of figuring out whether I can only force it for
>>> certain
>>> queues.
>>
>> You can use 2 different queue connection factories. With and without
>> the sync sending.
>> Or how did you go around this issue?
>>
>> Thanks Claus for the suggestion.
>>
>> Decided it was best to use either sync or async.  It is not possible in
>> ActiveMQ to set sendFailIfNoSpace for each individual queue.  It looks
>> like system setting.

Have you suggested this new feature on the AMQ forums?


>>
>> Allen
>>
>>
>>>
>>> Thanks for the help.
>>> Allen.
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> Hi
>>>>
>>>> AMQ have a failover protocol that can "self heal".
>>>>
>>>> I suggest to ask on the AMQ forum as its a AMQ question whether it can
>>>> signal back to the client when it cannot accept any new messages due
>>>> to out of space.
>>>>
>>>>
>>>>
>>>> On Wed, Aug 19, 2009 at 4:10 AM, allen.lau<gu...@gmail.com> wrote:
>>>>>
>>>>> Hi,  I'm testing out the jms component using a route like so:
>>>>>
>>>>>  <camelContext id="producer" trace="true"
>>>>> xmlns="http://camel.apache.org/schema/spring">
>>>>>        <route>
>>>>>            <from uri="file:src/data?noop=true"/>
>>>>>            <loop>
>>>>>                <constant>200</constant>
>>>>>                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
>>>>>            </loop>
>>>>>            <stop/>
>>>>>        </route>
>>>>>    </camelContext>
>>>>>
>>>>> I have also configured the activeMQ broker to fail send if no space
>>>>> using
>>>>> the option:  <systemUsage sendFailIfNoSpace="true">
>>>>>
>>>>> What I was hoping to achieve is to capture the exception that is thrown
>>>>> from
>>>>> ActiveMQ in the Camel route and retry accordingly.   It seems though
>>>>> that
>>>>> the Camel route never sees the exception.
>>>>>
>>>>> Is my understanding incorrect or is this a bug in Camel?  I'm using
>>>>> 2.0-M3
>>>>> and ActiveMQ 5.2.0 in my tests.
>>>>
>>>> No its not a bug in Camel as AMQ do not signal back to Camel that it
>>>> cannot accept the message.
>>>> However AMQ have a ton of options and it can be a bit hard to find it
>>>> and configure it so it work.
>>>>
>>>> So ask at the AMQ forum to get attention of the AMQ experts.
>>>>
>>>> Camel uses Spring JMS underneath so if someone have a pure Spring JMS
>>>> solution it should be possible with Camel as well.
>>>>
>>>>
>>>>>
>>>>> Thanks,
>>>>> Allen
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25049040.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25230306.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: JMSExceptions from jms component?

Posted by "allen.lau" <gu...@gmail.com>.


Claus Ibsen-2 wrote:
> 
> On Wed, Aug 19, 2009 at 7:57 PM, allen.lau<gu...@gmail.com> wrote:
>>
>> Claus,  you are right, I had to set "alwaysSynSend=true" in
>> ActiveMQConnectionFactory to see the exception.
>>
>> Now it is a matter of figuring out whether I can only force it for
>> certain
>> queues.
> 
> You can use 2 different queue connection factories. With and without
> the sync sending.
> Or how did you go around this issue?
> 
> Thanks Claus for the suggestion.
> 
> Decided it was best to use either sync or async.  It is not possible in
> ActiveMQ to set sendFailIfNoSpace for each individual queue.  It looks
> like system setting.
> 
> Allen
> 
> 
>>
>> Thanks for the help.
>> Allen.
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> AMQ have a failover protocol that can "self heal".
>>>
>>> I suggest to ask on the AMQ forum as its a AMQ question whether it can
>>> signal back to the client when it cannot accept any new messages due
>>> to out of space.
>>>
>>>
>>>
>>> On Wed, Aug 19, 2009 at 4:10 AM, allen.lau<gu...@gmail.com> wrote:
>>>>
>>>> Hi,  I'm testing out the jms component using a route like so:
>>>>
>>>>  <camelContext id="producer" trace="true"
>>>> xmlns="http://camel.apache.org/schema/spring">
>>>>        <route>
>>>>            <from uri="file:src/data?noop=true"/>
>>>>            <loop>
>>>>                <constant>200</constant>
>>>>                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
>>>>            </loop>
>>>>            <stop/>
>>>>        </route>
>>>>    </camelContext>
>>>>
>>>> I have also configured the activeMQ broker to fail send if no space
>>>> using
>>>> the option:  <systemUsage sendFailIfNoSpace="true">
>>>>
>>>> What I was hoping to achieve is to capture the exception that is thrown
>>>> from
>>>> ActiveMQ in the Camel route and retry accordingly.   It seems though
>>>> that
>>>> the Camel route never sees the exception.
>>>>
>>>> Is my understanding incorrect or is this a bug in Camel?  I'm using
>>>> 2.0-M3
>>>> and ActiveMQ 5.2.0 in my tests.
>>>
>>> No its not a bug in Camel as AMQ do not signal back to Camel that it
>>> cannot accept the message.
>>> However AMQ have a ton of options and it can be a bit hard to find it
>>> and configure it so it work.
>>>
>>> So ask at the AMQ forum to get attention of the AMQ experts.
>>>
>>> Camel uses Spring JMS underneath so if someone have a pure Spring JMS
>>> solution it should be possible with Camel as well.
>>>
>>>
>>>>
>>>> Thanks,
>>>> Allen
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25049040.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25230306.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMSExceptions from jms component?

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Aug 19, 2009 at 7:57 PM, allen.lau<gu...@gmail.com> wrote:
>
> Claus,  you are right, I had to set "alwaysSynSend=true" in
> ActiveMQConnectionFactory to see the exception.
>
> Now it is a matter of figuring out whether I can only force it for certain
> queues.

You can use 2 different queue connection factories. With and without
the sync sending.
Or how did you go around this issue?


>
> Thanks for the help.
> Allen.
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> AMQ have a failover protocol that can "self heal".
>>
>> I suggest to ask on the AMQ forum as its a AMQ question whether it can
>> signal back to the client when it cannot accept any new messages due
>> to out of space.
>>
>>
>>
>> On Wed, Aug 19, 2009 at 4:10 AM, allen.lau<gu...@gmail.com> wrote:
>>>
>>> Hi,  I'm testing out the jms component using a route like so:
>>>
>>>  <camelContext id="producer" trace="true"
>>> xmlns="http://camel.apache.org/schema/spring">
>>>        <route>
>>>            <from uri="file:src/data?noop=true"/>
>>>            <loop>
>>>                <constant>200</constant>
>>>                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
>>>            </loop>
>>>            <stop/>
>>>        </route>
>>>    </camelContext>
>>>
>>> I have also configured the activeMQ broker to fail send if no space using
>>> the option:  <systemUsage sendFailIfNoSpace="true">
>>>
>>> What I was hoping to achieve is to capture the exception that is thrown
>>> from
>>> ActiveMQ in the Camel route and retry accordingly.   It seems though that
>>> the Camel route never sees the exception.
>>>
>>> Is my understanding incorrect or is this a bug in Camel?  I'm using
>>> 2.0-M3
>>> and ActiveMQ 5.2.0 in my tests.
>>
>> No its not a bug in Camel as AMQ do not signal back to Camel that it
>> cannot accept the message.
>> However AMQ have a ton of options and it can be a bit hard to find it
>> and configure it so it work.
>>
>> So ask at the AMQ forum to get attention of the AMQ experts.
>>
>> Camel uses Spring JMS underneath so if someone have a pure Spring JMS
>> solution it should be possible with Camel as well.
>>
>>
>>>
>>> Thanks,
>>> Allen
>>> --
>>> View this message in context:
>>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25049040.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: JMSExceptions from jms component?

Posted by "allen.lau" <gu...@gmail.com>.
Claus,  you are right, I had to set "alwaysSynSend=true" in
ActiveMQConnectionFactory to see the exception.

Now it is a matter of figuring out whether I can only force it for certain
queues.

Thanks for the help.
Allen.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> AMQ have a failover protocol that can "self heal".
> 
> I suggest to ask on the AMQ forum as its a AMQ question whether it can
> signal back to the client when it cannot accept any new messages due
> to out of space.
> 
> 
> 
> On Wed, Aug 19, 2009 at 4:10 AM, allen.lau<gu...@gmail.com> wrote:
>>
>> Hi,  I'm testing out the jms component using a route like so:
>>
>>  <camelContext id="producer" trace="true"
>> xmlns="http://camel.apache.org/schema/spring">
>>        <route>
>>            <from uri="file:src/data?noop=true"/>
>>            <loop>
>>                <constant>200</constant>
>>                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
>>            </loop>
>>            <stop/>
>>        </route>
>>    </camelContext>
>>
>> I have also configured the activeMQ broker to fail send if no space using
>> the option:  <systemUsage sendFailIfNoSpace="true">
>>
>> What I was hoping to achieve is to capture the exception that is thrown
>> from
>> ActiveMQ in the Camel route and retry accordingly.   It seems though that
>> the Camel route never sees the exception.
>>
>> Is my understanding incorrect or is this a bug in Camel?  I'm using
>> 2.0-M3
>> and ActiveMQ 5.2.0 in my tests.
> 
> No its not a bug in Camel as AMQ do not signal back to Camel that it
> cannot accept the message.
> However AMQ have a ton of options and it can be a bit hard to find it
> and configure it so it work.
> 
> So ask at the AMQ forum to get attention of the AMQ experts.
> 
> Camel uses Spring JMS underneath so if someone have a pure Spring JMS
> solution it should be possible with Camel as well.
> 
> 
>>
>> Thanks,
>> Allen
>> --
>> View this message in context:
>> http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25049040.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMSExceptions from jms component?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

AMQ have a failover protocol that can "self heal".

I suggest to ask on the AMQ forum as its a AMQ question whether it can
signal back to the client when it cannot accept any new messages due
to out of space.



On Wed, Aug 19, 2009 at 4:10 AM, allen.lau<gu...@gmail.com> wrote:
>
> Hi,  I'm testing out the jms component using a route like so:
>
>  <camelContext id="producer" trace="true"
> xmlns="http://camel.apache.org/schema/spring">
>        <route>
>            <from uri="file:src/data?noop=true"/>
>            <loop>
>                <constant>200</constant>
>                <to uri="jms:LOAD_TEST" pattern="InOnly"/>
>            </loop>
>            <stop/>
>        </route>
>    </camelContext>
>
> I have also configured the activeMQ broker to fail send if no space using
> the option:  <systemUsage sendFailIfNoSpace="true">
>
> What I was hoping to achieve is to capture the exception that is thrown from
> ActiveMQ in the Camel route and retry accordingly.   It seems though that
> the Camel route never sees the exception.
>
> Is my understanding incorrect or is this a bug in Camel?  I'm using 2.0-M3
> and ActiveMQ 5.2.0 in my tests.

No its not a bug in Camel as AMQ do not signal back to Camel that it
cannot accept the message.
However AMQ have a ton of options and it can be a bit hard to find it
and configure it so it work.

So ask at the AMQ forum to get attention of the AMQ experts.

Camel uses Spring JMS underneath so if someone have a pure Spring JMS
solution it should be possible with Camel as well.


>
> Thanks,
> Allen
> --
> View this message in context: http://www.nabble.com/JMSExceptions-from-jms-component--tp25036666p25036666.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus