1

I'm using Hangfire with MSMQ. Here is the setup

  • 2 Front-end Servers (for IIS), I will call them web1 and web2
  • A 3rd server for Hangfire Windows Service (I'll call it app1)
  • A load balancer between them.

Problem

When I tried to access Hangfire dashboard using the hostname (let's say koko.com/hangfire) the message will be enqueued in one of the web servers MSMQs. You can see it in Outgoing MSMQ messages in web1 or web2.

So I did more investigation to know why the message is not moving out from Outgoing Messages.

I simply accessed the dashboard from http://localhost/hangfire in web1 and it works. then I enqueued the jobs from there and it did not work. When I repeat the same process in web2 it works!

Why enqueuing messages from web2 is working but not in web1?! The messages are stuck in web1 Outgoing Queues

Alenros
  • 816
  • 7
  • 23
bunjeeb
  • 1,096
  • 1
  • 17
  • 32
  • A message stuck in outgoing means that the queue manager on the sending machine cannot connect to the queue manager on the receiving machine. This could be for a number of reasons, eg trust between sender and receiver, firewall on receiving machine, etc. Is the receiving machine the hangfire server? – tom redfern Jun 28 '18 at 09:28
  • @tomredfern yes it is. – bunjeeb Jun 28 '18 at 12:16
  • Is there any difference in set up between web1 and the hangfire server and the set up between web2 and the hangfire server? – tom redfern Jun 28 '18 at 13:40
  • There is no difference ... but you know maybe it’s bcz of cloning web2 from web1 ... I will try to delete the queues and build it again. – bunjeeb Jun 28 '18 at 13:44
  • 1
    In the end, we dropped the whole MSMQ configuration in Hangfire and depend on SQL polling. MSMQ makes things complicated! High availability setup is a nightmare. Check the Configuration that we are using https://docs.hangfire.io/en/latest/configuration/using-sql-server.html#configuring-the-polling-interval – bunjeeb May 10 '21 at 04:47

0 Answers0