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: [Qpid Java Broker] Remove alternate exchange
Date Tue, 07 Mar 2017 15:01:39 GMT
On 7 March 2017 at 14:25, Vavricka <vavricka.tomas@gmail.com> wrote:

> Hi,
>
>   I have two exchanges with alternate exchange set to the other exchange.
>
>  Below are the two exchanges in following format <Exchange name,Alternate
> exchange>
>
>   broadcast,broadcast_resend
>   broadcast_resend,broadcast
>
>   I am trying to remove exchange by REST API.
>
>  When I tried to remove exchange 'broadcast' Java Broker complained that
> exchange is used in another exchange as alternate exchange.
>
>   Then I tried to remove alternate exchange from exchange 'broadcast'.
>   I tried to remove alternate exchange by configured object update as
> described at
> https://qpid.apache.org/releases/qpid-java-6.1.1/java-
> broker/book/Java-Broker-Management-Channel-REST-API.html
> (section 6.3.5).
>
>   I tried to set parameters to { "alternateExchange" : "" } which failed
> with error "Cannot convert '' into a
> org.apache.qpid.server.model.Exchange<?> for attribute alternateExchange
> (Could not find object of category Exchange with name '')".
>
>
You'll need to set the to { "alternateExchange" : null } - this should
remove the alternate exchange reference, the following worked for me on an
exchange foo:

curl -X POST -H "Content-Type: application/json" -d '{ "alternateExchange"
: null }' http://localhost:8888/api/latest/exchange/default/default/foo

Hope this helps,
-- Rob


>   Then I tried to set whole exchange object. I received JSON string of
> exchange object, map it to Jackson JsonNode, remove "alternateExchange" key
> and then made configured object update of exchange with rest of exchange
> parameters. This call successfully passes, but no change is done, alternate
> exchange still persists.
>
>   Is this the correct way how to remove exchange with alternate exchange?
>
>   Vavricka
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.
> com/Qpid-Java-Broker-Remove-alternate-exchange-tp7660147.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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message