bootique/bootique-rabbitmq-client

Exception when using ChannelFactory.openChannel()

mintster opened this issue ยท 8 comments

Maybe I'm missing something, or that this is known behavior, but an exception occurs when using Bootique ChannelFactory.openChannel() if a RabbitMQ Exchange with the same name of the Queue does not exist.

Creating a Channel Example

Connection connection = connectionFactory.forName(CONNECTION_NAME);

// RabbitMQ Exchange with "bqQueue" must exist or IOException is thrown
Channel channel = channelFactory.openChannel(connection, EXCHANGE_NAME, QUEUE_NAME, "");

If both named bqQueue, no error. If Exchange bqExchange and Queue bqQueue, runtime exception.

The Exception

channel error; protocol method: #method<channel.close>
    (reply-code=404, reply-text=NOT_FOUND - 
     no exchange 'bqQueue' in vhost '/', class-id=40, method-id=30)

I created an App to demonstrate the issue.

bootique-rabbitmq-issue

Thanks.

Hello Dave.
I have no immediate answer but i'm going to check this problem one of these days.

Thank you for your response and demo.

Elias,

Thanks for the the reply and putting this issue in the 'queue'. haha

-Dave

IRus commented

Please check #2

Nice, our first testcontainers use across Bootique I believe :) cc: @bsideup

@andrus @IRus this is great! :) Happy to see it works and helped :) ๐ŸŽ‰ ๐Ÿ‘

@IRus, thanks for fix and integration of testcontainers. Docker test is good solution. Anyway I've created two client apps to check module in real environment - it works - so I've merged PR.

@RealElias Can we please create a RELEASE-NOTES.md file for bootique-rabbitmq to track the tasks in each release? E.g. similar to this.

@andrus, of course