Skip to content

Commit edae698

Browse files
authored
Merge pull request #15 from juanpmarin/master
Unbind queue with topology creator
2 parents 56c1bd3 + 4fa4bbd commit edae698

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

async/async-commons/src/main/java/org/reactivecommons/async/impl/communications/TopologyCreator.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ public Mono<AMQP.Queue.BindOk> bind(BindingSpecification binding){
6363
});
6464
}
6565

66+
public Mono<AMQP.Queue.UnbindOk> unbind(BindingSpecification binding) {
67+
return channel.map(ch -> {
68+
try {
69+
return ch.queueUnbind(binding.getQueue(), binding.getExchange(), binding.getRoutingKey(), binding.getArguments());
70+
} catch (IOException e) {
71+
throw new TopologyDefException("Fail to unbind queue: " + binding.getQueue(), e);
72+
}
73+
}) ;
74+
}
75+
6676
public static class TopologyDefException extends RuntimeException {
6777
public TopologyDefException(String message, Throwable cause) {
6878
super(message, cause);

0 commit comments

Comments
 (0)