Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Release version compatible with SpringBoot 3.0 #88

Open
rwanderc opened this issue Apr 18, 2022 · 13 comments · May be fixed by #95
Open

Release version compatible with SpringBoot 3.0 #88

rwanderc opened this issue Apr 18, 2022 · 13 comments · May be fixed by #95
Assignees
Labels

Comments

@rwanderc
Copy link
Contributor

TBD:

  • double-check if SP works with the same beans
@rwanderc rwanderc self-assigned this Apr 18, 2022
@joaquinjsb
Copy link

I'm using it on spring boot 3.x and its working with a few workarounds, but I don't know if you working on it actively nor I could help with the 3.x compatibility.

@rwanderc
Copy link
Contributor Author

Hi @joaquinjsb. Pls feel free to submit your PR.

@davidwiniarz
Copy link

@joaquinjsb if you could share your solution. I'm currently struggling with SB 3.0.2 which does not automatically creates beans with different AMQPs.

@joaquinjsb
Copy link

I created a component like this:

@ConditionalOnProperty(prefix = "spring", name = "multirabbitmq.enabled", havingValue = "true")
@EnableRabbit
@Import({MultiRabbitAutoConfiguration.class, RabbitAutoConfiguration.class})
@Component
public class RabbitMQConnector { 

}

for some reason the auto scan of the package isn't working, so I just copied the parameter on my custom class, and it's working back like it used to.

@davidwiniarz
Copy link

davidwiniarz commented Feb 15, 2023

Well, I did as you say, but with no result.
Error I'm getting : A component required a bean named "connectionNameA-admin" that could not be found.

There is no such error with SB 2.7.x

I'm using SB 3.0.2

Any ideas?

@joaquinjsb
Copy link

do you mind creating me a sample project? I can give a look to it.

@davidwiniarz
Copy link

davidwiniarz commented Feb 15, 2023

Sure, here you can find it.

https://files.fm/u/3rku4nrbw

But it's working now. What I did not do... I didn't have the default @RabbitListener (each one has connectionFactory property) and then, it doesn't work. Maybe you know why?

@joaquinjsb
Copy link

joaquinjsb commented Feb 15, 2023

Screenshot 2023-02-15 alle 17 27 04

yay, I started it and it was working without issues, glad I could help.

EDIT:
that happens because you haven't defined a default rabbitMQ connection like the docs says, if u don't use spring one, you gotta select one as the default.

@davidwiniarz
Copy link

Thanks.

One more question.
Now while connecting to AMQP server it tells me sth like: inequivalent arg 'type' for exchange 'exchange1' in vhost 'xx' - received 'direct' but current is 'topic'.

In fact, the one I'm connecting to is of type 'topic'
Is this app is trying to create a new one, with the same name, but different 'type'

@davidwiniarz
Copy link

davidwiniarz commented Feb 15, 2023

OK, I've solved the issue by putting type in @Exchange

@SebastianOltmanns
Copy link

What is the status on this issue? I would like to update to SB3 with a SB3-compatible multirabbit. I see the workaround. Can't this simply be integrated into the multirabbit project for a SB3-compatible multirabbit?

@SebastianOltmanns
Copy link

On some investigation, I think the issue that appears here is documented in the release notets of SB3:

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes#auto-configuration-registration

@SebastianOltmanns SebastianOltmanns linked a pull request Mar 15, 2023 that will close this issue
@SebastianOltmanns
Copy link

Please see #95

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

4 participants