EasyNetQ fails to publish to RabbitMQ - PersistentChannel timed out

后端 未结 2 1014
时光取名叫无心
时光取名叫无心 2021-01-11 13:12

I am trying to connect to RabbitMQ with EasyNetQ. RabbitMQ is on remote VM.

_rabbitBus = RabbitHutch.CreateBus(
    string.Format(\"host={0};virtualhost={1}\         


        
相关标签:
2条回答
  • 2021-01-11 13:24

    Did you check your credentials. The default username and password is 'guest' and 'guest'. The error message is not very helpful. You get 'None of the specified endpoints were reachable' if there's an authentication error as well

    0 讨论(0)
  • 2021-01-11 13:37

    As Mike suggested i had this and then checked the permissions. "guest" user can only connect via localhost (see RabbitMQ Access Control.) Try adding a user with permissions using the management interface and then connect as below

    var _bus = RabbitHutch.CreateBus(string.Format("host={0};virtualhost={1};username={2};password={3}", 
    _hostSettings.Host, _hostSettings.VHost, _hostSettings.UserName, _hostSettings.Password));
    
    0 讨论(0)
提交回复
热议问题