routing key

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

routing key

PATAR, SAGAR

I am using “org.springframework.amqp.core.MessageListener” and am binding to an exchange using a pattern ..

 

I am sending message with binding key as “1xx” , “1xx.sdk”

 

I am using the below pattern to match the above binding keys

 

1#  - not working

*xx# - not working

#1# - not working

 

1xx – is working

# - is working

 

The exchange is amqp.topic … Not sure what the issue is ..Appreciate any help on this

 


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: routing key

Michael Klishin-2
On 17 Oct 2013, at 18:34, "PATAR, SAGAR" <[hidden email]> wrote:

> I am using “org.springframework.amqp.core.MessageListener” and am binding to an exchange using a pattern ..

Is the key just ".." or is it a typo?

Two dots don't really make sense for topic exchanges. Do you mean *.*?

MK



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: routing key

PATAR, SAGAR
I am using "org.springframework.amqp.core.MessageListener" and am binding to an exchange (amqp.topic) using a below pattern

1#  - not working
*xx# - not working
#1# - not working

1xx - is working
# - is working

The first 3 patterns seems to be not working but the last two are working and messages are forwarded ..
I am sending message with binding key as "1xx"


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Michael Klishin
Sent: Thursday, October 17, 2013 10:43 AM
To: Discussions about RabbitMQ
Subject: Re: [rabbitmq-discuss] routing key

On 17 Oct 2013, at 18:34, "PATAR, SAGAR" <[hidden email]> wrote:

> I am using "org.springframework.amqp.core.MessageListener" and am binding to an exchange using a pattern ..

Is the key just ".." or is it a typo?

Two dots don't really make sense for topic exchanges. Do you mean *.*?

MK



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: routing key

Matthias Radestock-3
On 17/10/13 16:06, PATAR, SAGAR wrote:

> I am using "org.springframework.amqp.core.MessageListener" and am binding to an exchange (amqp.topic) using a below pattern
>
> 1#  - not working
> *xx# - not working
> #1# - not working
>
> 1xx - is working
> # - is working
>
> The first 3 patterns seems to be not working but the last two are working and messages are forwarded ..
> I am sending message with binding key as "1xx"

See http://www.rabbitmq.com/tutorials/tutorial-five-python.html

"Messages sent to a topic exchange can't have an arbitrary routing_key -
it must be *a list of words, delimited by dots*.
...
     * (star) can substitute for exactly one *word*.
     # (hash) can substitute for zero or more *words*.
"

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: routing key

Chris-3
In reply to this post by PATAR, SAGAR
Wildcards only work to replace whole words in a routing key pattern (with the '.' providing the boundary between words).  The tutorial on Topics explains it like this:

However there are two important special cases for binding keys:

  • * (star) can substitute for exactly one word.
  • # (hash) can substitute for zero or more words.

So putting the wildcards in the middle of words (as in your first three examples) is not expected to work

-Chris



On Thu, Oct 17, 2013 at 11:06 AM, PATAR, SAGAR <[hidden email]> wrote:
I am using "org.springframework.amqp.core.MessageListener" and am binding to an exchange (amqp.topic) using a below pattern

1#  - not working
*xx# - not working
#1# - not working

1xx - is working
# - is working

The first 3 patterns seems to be not working but the last two are working and messages are forwarded ..
I am sending message with binding key as "1xx"


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Michael Klishin
Sent: Thursday, October 17, 2013 10:43 AM
To: Discussions about RabbitMQ
Subject: Re: [rabbitmq-discuss] routing key

On 17 Oct 2013, at 18:34, "PATAR, SAGAR" <[hidden email]> wrote:

> I am using "org.springframework.amqp.core.MessageListener" and am binding to an exchange using a pattern ..

Is the key just ".." or is it a typo?

Two dots don't really make sense for topic exchanges. Do you mean *.*?

MK



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss