Skip to content

Commit 1cb6734

Browse files
committed
Support queue options
1 parent cfa46ab commit 1cb6734

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/why/pubsub/amqp/Amqp.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AmqpBase {
2121
wrapped = manager.createChannel({
2222
setup: channel -> {
2323
Promise.inParallel([for(exchange in config.exchanges) Promise.ofJsPromise(channel.assertExchange(exchange.name, exchange.type))])
24-
.next(_ -> Promise.inParallel([for(queue in config.queues) Promise.ofJsPromise(channel.assertQueue(queue.name))]))
24+
.next(_ -> Promise.inParallel([for(queue in config.queues) Promise.ofJsPromise(channel.assertQueue(queue.name, queue.options))]))
2525
.next(_ -> Promise.inParallel([for(queue in config.queues) for(binding in queue.bindings) Promise.ofJsPromise(channel.bindQueue(queue.name, binding.exchange, binding.pattern))]))
2626
.noise()
2727
.map(o -> {
@@ -49,6 +49,7 @@ typedef ExchangeConfig = {
4949
}
5050
typedef QueueConfig = {
5151
final name:String;
52+
final ?options:amqp.AmqpChannel.AmpqAssertQueueOptions;
5253
final bindings:Array<BindingConfig>;
5354
}
5455
typedef BindingConfig = {

0 commit comments

Comments
 (0)