Results 1 to 4 of 4

Thread: Using Custom Exchanges?

  1. #1

    Default Using Custom Exchanges?

    Hey All,

    I'm playing around with some ideas using the custom exchanges that can be added onto RabbitMQ, specifically https://github.com/tonyg/script-exchange. Currently I am unable to find anywhere in the documentation that allows for publishing to Custom exchange types. Does spring-amqp expose this functionality?


    Thanks,
    James

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    In Spring AMQP, you only need to provide the Exchange name, either as a property of the RabbitTemplate, or as a method-argument if you need to make the decision at runtime. The Exchange can be defined on the broker by any means.

    HTH,
    Mark

  3. #3

    Default

    Thanks Mark... I'm actually giving a try now. One area of confusion though is that it seems that binding it might be difficult as the Binding class only supports the 4 base exchange types in the constructors.

    However I'm about to test the behavior out, so we'll see what happens.

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    Think of the Spring AMQP Binding object as just a convenience, and one that only supports the known Exchange types. You can just as easily do the binding separately. It could be done directly against the broker, or you could use this lower level method of the Spring AMQP RabbitTemplate:
    Code:
    execute(ChannelCallback<T> action)
    That callback's method will hand you a com.rabbitmq.client.Channel instance, and then you can call any of its available methods, e.g. queueBind(..)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •