You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Qpid_user <Ma...@hotmail.com> on 2012/05/22 01:08:46 UTC

Problem with qpid topic and apache camel

Hi, 

I am using camel version 2.9.1, with qpid amqp 0.10 

I've defined my amqp endpoint as: 

<from uri="amqp:topic:{{broadcast.queue}}" />

where {{broadcast.queue}} is 

broadcast.BLABLA.TradeNotification;{ node: { type: queue },create: never,
mode: consume, assert: never }} 

when I start the application, I get no errors, but the endpoint is not
receiving any amqp messages that are on the topic.

The only thing I can see in the logs is this message: 

2012-05-21 18:09:32,837 [DEBUG-main]
component.jms.DefaultJmsMessageListenerContainer - Listener container task
[org.springframework.jms.listener.DefaultMessage 
ListenerContainer$AsyncMessageListenerInvoker@48899e6a] has been rejected
and paused: java.lang.IllegalArgumentException: Pattern is invalid: Camel
(eurex) thre 
ad #${counter} - ${name} 

I have traced the problem to org.apache.camel.util.concurrent.ThreadHelper
class resolveThreadName(String pattern, String name) method 

which throws this error: 

throw new IllegalArgumentException("Pattern is invalid: " + pattern);

if (answer.indexOf("$") > -1 || answer.indexOf("${") > -1 ||
answer.indexOf("}") > -1) {
          
answer in this case being: 

Camel (camel-1) thread #1 - JmsConsumer[broadcast.BLABLA.TradeNotification;{
node: { type: queue },create: never, mode: consume, assert: never }]

as a result of this IllegalArgumentException the amqp endpoint is rejected
and paused and hence no messages would arrive. 

Has anyone experienced this problem or know a workaround? 

I've tried escaping the } (right curly bracket that causes the issue) by
\\}, RBRACE and even html codes to no avail. 

Any help/suggestions would be appreciated! 
        

--
View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/Problem-with-qpid-topic-and-apache-camel-tp7570155.html
Sent from the Apache Qpid developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Problem with qpid topic and apache camel

Posted by Gordon Sim <gs...@redhat.com>.
On 05/22/2012 12:08 AM, Qpid_user wrote:
> Hi,
>
> I am using camel version 2.9.1, with qpid amqp 0.10
>
> I've defined my amqp endpoint as:
>
> <from uri="amqp:topic:{{broadcast.queue}}" />
>
> where {{broadcast.queue}} is
>
> broadcast.BLABLA.TradeNotification;{ node: { type: queue },create: never,
> mode: consume, assert: never }}

Not really a solution to the actual problem, but all the address options 
you have there are the defaults. You could in other words replace that 
with simply broadcast.BLABLA.TradeNotification and get (almost) the same 
behaviour.

One possible difference is that without an explicit node type the 
library will have to lookup the type at runtime...

(Btw, are you sure you want to use a queue and not a topic node (aka an 
exchange?)

> when I start the application, I get no errors, but the endpoint is not
> receiving any amqp messages that are on the topic.
>
> The only thing I can see in the logs is this message:
>
> 2012-05-21 18:09:32,837 [DEBUG-main]
> component.jms.DefaultJmsMessageListenerContainer - Listener container task
> [org.springframework.jms.listener.DefaultMessage
> ListenerContainer$AsyncMessageListenerInvoker@48899e6a] has been rejected
> and paused: java.lang.IllegalArgumentException: Pattern is invalid: Camel
> (eurex) thre
> ad #${counter} - ${name}
>
> I have traced the problem to org.apache.camel.util.concurrent.ThreadHelper
> class resolveThreadName(String pattern, String name) method
>
> which throws this error:
>
> throw new IllegalArgumentException("Pattern is invalid: " + pattern);
>
> if (answer.indexOf("$")>  -1 || answer.indexOf("${")>  -1 ||
> answer.indexOf("}")>  -1) {
>
> answer in this case being:
>
> Camel (camel-1) thread #1 - JmsConsumer[broadcast.BLABLA.TradeNotification;{
> node: { type: queue },create: never, mode: consume, assert: never }]
>
> as a result of this IllegalArgumentException the amqp endpoint is rejected
> and paused and hence no messages would arrive.
>
> Has anyone experienced this problem or know a workaround?
>
> I've tried escaping the } (right curly bracket that causes the issue) by
> \\}, RBRACE and even html codes to no avail.
>
> Any help/suggestions would be appreciated!
>
>
> --
> View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/Problem-with-qpid-topic-and-apache-camel-tp7570155.html
> Sent from the Apache Qpid developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org