[ 
https://issues.apache.org/jira/browse/QPID-4874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michal Zerola updated QPID-4874:
--------------------------------

    Description: 
This is a follow-up on the discussion started on:

http://mail-archives.apache.org/mod_mbox/qpid-users/201303.mbox/%3CCAFitrpTiPo_yMhitGBM-1=QiW8xnKz3O2tqgSP3xbooDDC=y...@mail.gmail.com%3E

I haven't seen any JIRA covering this issue yet. Setting an alternate exchange 
on the exchange is not possible now from the REST interface (e.g. using curl / 
web management).

The only way how one can set an alternate exchange is using the proper address 
from the JMS client and passing it to the MessageProducer:

{{"ADDR:test-exch; {create: always, node:{type: 
topic,x-declare:{alternate-exchange:'amq.fanout'}}}"}}

The exchange 'test-exch' will then keep reference to the alternate exchange 
'amq.fanout'. However, listing the exchange using the 'curl' will fail (produce 
endless output). I assume that the problem is caused by Json mapper, having 
problems to write object which is not ConfiguredObject (in this case it is 
FanoutExchange). I think the solution can be to return the alternate exchange 
name (and not an object) from the ExchangeAdapter.java as I illustrated in the 
attached patch.

Thank you,

Michal

  was:
This is a follow-up on the discussion started on:

http://mail-archives.apache.org/mod_mbox/qpid-users/201303.mbox/%3CCAFitrpTiPo_yMhitGBM-1=QiW8xnKz3O2tqgSP3xbooDDC=y...@mail.gmail.com%3E

I haven't seen any JIRA covering this issue yet. Setting an alternate exchange 
on the exchange is not possible now from the REST interface (e.g. using curl / 
web management).

The only way how one can set an alternate exchange is using the proper address 
from the JMS client and passing it to the MessageProducer:

"ADDR:test-exch; {create: always, node:{type: 
topic,x-declare:{alternate-exchange:'amq.fanout'}}}"

The exchange 'test-exch' will then keep reference to the alternate exchange 
'amq.fanout'. However, listing the exchange using the 'curl' will fail (produce 
endless output). I assume that the problem is caused by Json mapper, having 
problems to write object which is not ConfiguredObject (in this case it is 
FanoutExchange). I think the solution can be to return the alternate exchange 
name (and not an object) from the ExchangeAdapter.java as I illustrated in the 
attached patch.

Thank you,

Michal

    
> Alternate exchange unable to set from REST
> ------------------------------------------
>
>                 Key: QPID-4874
>                 URL: https://issues.apache.org/jira/browse/QPID-4874
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.20
>            Reporter: Michal Zerola
>             Fix For: Future
>
>
> This is a follow-up on the discussion started on:
> http://mail-archives.apache.org/mod_mbox/qpid-users/201303.mbox/%3CCAFitrpTiPo_yMhitGBM-1=QiW8xnKz3O2tqgSP3xbooDDC=y...@mail.gmail.com%3E
> I haven't seen any JIRA covering this issue yet. Setting an alternate 
> exchange on the exchange is not possible now from the REST interface (e.g. 
> using curl / web management).
> The only way how one can set an alternate exchange is using the proper 
> address from the JMS client and passing it to the MessageProducer:
> {{"ADDR:test-exch; {create: always, node:{type: 
> topic,x-declare:{alternate-exchange:'amq.fanout'}}}"}}
> The exchange 'test-exch' will then keep reference to the alternate exchange 
> 'amq.fanout'. However, listing the exchange using the 'curl' will fail 
> (produce endless output). I assume that the problem is caused by Json mapper, 
> having problems to write object which is not ConfiguredObject (in this case 
> it is FanoutExchange). I think the solution can be to return the alternate 
> exchange name (and not an object) from the ExchangeAdapter.java as I 
> illustrated in the attached patch.
> Thank you,
> Michal

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to