Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.voterapi.candidate.configuration;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
public class CandidateConfig {
public Queue queue() {
return new Queue("voter.rpc.requests");
public DirectExchange exchange() {
return new DirectExchange("voter.rpc");
public Binding binding(DirectExchange exchange, Queue queue) {
return BindingBuilder.bind(queue).to(exchange).with("rpc");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment