qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Godfrey <rob.j.godf...@gmail.com>
Subject Re: Java Broker exclusive binding
Date Tue, 04 Oct 2016 09:01:37 GMT
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 <vavricka.tomas@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


Mime
View raw message