Created
September 9, 2019 09:51
-
-
Save timpamungkasudemy/e98f884d3d6de447c3c0c7266977f108 to your computer and use it in GitHub Desktop.
Create Fanout Exchange using single method that return `Declarables`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create Fanout Exchange using single method that return `Declarables` | |
import org.springframework.amqp.core.Binding; | |
import org.springframework.amqp.core.Binding.DestinationType; | |
import org.springframework.amqp.core.Declarables; | |
import org.springframework.amqp.core.FanoutExchange; | |
import org.springframework.amqp.core.Queue; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class RabbitmqSchemaConfig_Two { | |
@Bean | |
public Declarables createRabbitmqSchema() { | |
return new Declarables( | |
new FanoutExchange("x.another-dummy", true, false), | |
new Queue("q.another-dummy"), | |
new Binding("q.another-dummy", DestinationType.QUEUE, "x.another-dummy", "", null) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment