You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Vavricka <va...@gmail.com> on 2016/10/04 08:23:59 UTC

Java Broker exclusive binding

Hi, 

 I am using java broker version 6.0.2. I have one queue named 'test.queue'
and on this queue set two bindings. First binding is more specific 'test.#'
and second binding is '#'. 

 When I send message with routing key 'test.a', message is forwarded by both
bindings. Is it possible to set bindings (or queue) to use only the most
specific option (binding 'test.#') when it can be applied?

 I know that similar behavior (like binding '#') can be achieved by setting
alternate exchange, but it will be helpful if some configuration options
could allow using only one binding for routed message.

 In REST API definitions I found attribute named 'type' which looks
promising, but unfortunately I couldn't find any documentation about it.

 Vavricka



--
View this message in context: http://qpid.2158936.n2.nabble.com/Java-Broker-exclusive-binding-tp7651458.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Java Broker exclusive binding

Posted by Adel Boutros <Ad...@live.com>.
Hello,


To match a simple pattern delimited by a ".", you can use "*" instead of "#".


Regards,

Adel

________________________________
From: Vavricka <va...@gmail.com>
Sent: Tuesday, October 4, 2016 10:23:59 AM
To: users@qpid.apache.org
Subject: Java Broker exclusive binding

Hi,

 I am using java broker version 6.0.2. I have one queue named 'test.queue'
and on this queue set two bindings. First binding is more specific 'test.#'
and second binding is '#'.

 When I send message with routing key 'test.a', message is forwarded by both
bindings. Is it possible to set bindings (or queue) to use only the most
specific option (binding 'test.#') when it can be applied?

 I know that similar behavior (like binding '#') can be achieved by setting
alternate exchange, but it will be helpful if some configuration options
could allow using only one binding for routed message.

 In REST API definitions I found attribute named 'type' which looks
promising, but unfortunately I couldn't find any documentation about it.

 Vavricka



--
View this message in context: http://qpid.2158936.n2.nabble.com/Java-Broker-exclusive-binding-tp7651458.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Java Broker exclusive binding

Posted by Vavricka <va...@gmail.com>.
rgodfrey wrote
> I think what you are looking for here is a new type of exchange (or a
> variation on the topic exchange) where the message is routed to at
> most one binding - which would require bindings to have some sort or
> ordering / priority placed upon them.  There is nothing like that
> currently.

I meant exactly that, sorry for mine vague explanation.

Thanks a lot for clarifying.

Vavricka



--
View this message in context: http://qpid.2158936.n2.nabble.com/Java-Broker-exclusive-binding-tp7651458p7651464.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Java Broker exclusive binding

Posted by Rob Godfrey <ro...@gmail.com>.
Hi Vavricka,

I'm not sure I totally understand your question... if you have one
queue with two bindings and a message matches both bindings, the
message will still only be placed on the queue once.

Do you actually mean you have two queues, A and B, and A is bound to
the exchange with the key 'test.#' and B is bound to the exchange with
key '#', and a message with routing key 'test.foo' is sent, then the
message will be enqueued in both queues, but you would want it only to
be enqueued into A?

I think what you are looking for here is a new type of exchange (or a
variation on the topic exchange) where the message is routed to at
most one binding - which would require bindings to have some sort or
ordering / priority placed upon them.  There is nothing like that
currently.
If you have a small number of alternatives and are able to modify the
senders so that they add the routing key information into a message
header, you could use selectors on the bindings so that the binding
for '#' also included a selector "my_routing_header not like 'test.%'"
or something like that...

-- Rob



On 4 October 2016 at 09:23, Vavricka <va...@gmail.com> wrote:
> Hi,
>
>  I am using java broker version 6.0.2. I have one queue named 'test.queue'
> and on this queue set two bindings. First binding is more specific 'test.#'
> and second binding is '#'.
>
>  When I send message with routing key 'test.a', message is forwarded by both
> bindings. Is it possible to set bindings (or queue) to use only the most
> specific option (binding 'test.#') when it can be applied?
>
>  I know that similar behavior (like binding '#') can be achieved by setting
> alternate exchange, but it will be helpful if some configuration options
> could allow using only one binding for routed message.
>
>  In REST API definitions I found attribute named 'type' which looks
> promising, but unfortunately I couldn't find any documentation about it.
>
>  Vavricka
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Java-Broker-exclusive-binding-tp7651458.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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