Announcement Announcement Module
Collapse
No announcement yet.
Using Custom Exchanges? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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(..)

        Comment

        Working...
        X