question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IAdvancedBus.IsConnected is no longer true right after the bus has been created

See original GitHub issue

IAdvancedBus.IsConnected is no longer true right after the bus has been created. It’s flips to true after a call has been made with the bus.

var bus = RabbitHutch.CreateBus("host=localhost;username=myuser;password=mypass");
// bus.Advanced.IsConnected is false
await bus.PubSub.PublishAsync(new TestMsg());
// bus.Advanced.IsConnected is true

This has changed since 5.4.0

Is this intentionally or a bug?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
Plinercommented, Nov 17, 2020

On version 5.6 we used the IAdvancedBus.IsConnected for one of our k8s healt checks. Due to this change this obviously no longer works. Any suggestions on a workaround for this? (Or will the old behavior of IsConnected will come back eventually - I can’t really tell form the conversation above)

Thanks for the use case. Will look for a solution.

4reactions
jenshennebergcommented, Nov 17, 2020

On version 5.6 we used the IAdvancedBus.IsConnected for one of our k8s health checks. Due to this change this obviously no longer works. Any suggestions on a workaround for this? (Or will the old behaviour of IsConnected will come back eventually - I can’t really tell form the conversation above)

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happens when publishing messages with EasyNetQ ...
CreateBus to create an instance of IBus/IAdvancedBus to publish messages to RabbitMQ. The instance is returned but the IsConnected flag is set ...
Read more >
IAdvancedBus.cs
/// Task completes after publish has completed. If publisherConfirms=true is set in the connection string,; /// the task completes after an ACK is...
Read more >
The Advanced API - EasyNetQ/EasyNetQ GitHub Wiki
This is due to the fact that the bus will attempt to connect once before its constructor returns, which will raise RabbitAdvancedBus.OnConnected ...
Read more >
A Geek Christmas Quiz–The Answers! - Code rant
Yes yes, I know that's contentious, but I made up this quiz, so there! ... It was launched by stealth after the programme...
Read more >
using EasyNetQ multiple Handler for one consumer does not ...
Ok, after testing this code, these are the problems: First of all, you're disposing your advancedBus right after you register for consumption.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found