Define user.  The 'user' can be anything, right?  Doesn't need to be a person.  This is the only message sent back, so it needs to be helpful.

From: sbellone <notifications@github.com<mailto:notifications@github.com>>
Reply-To: VirtuOz/smart-router <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Friday, March 1, 2013 8:37 AM
To: VirtuOz/smart-router <smart-router@noreply.github.com<mailto:smart-router@noreply.github.com>>
Cc: Kevan Dunsmore <kevan.dunsmore@nuance.com<mailto:kevan.dunsmore@nuance.com>>
Subject: Re: [smart-router] Add nagios checks for rabbit mq (#10)


In lib/smartrouter.js:

>      var qmsg = {};
>      qmsg.type = type;
>      qmsg.message = message;
>      logger.debug(util.format('Publishing \'%s\' on Queue [%s]', type, destactorid));
> -    this.amqp.publish(destactorid, qmsg, { contentType: 'application/json' });
> +    // First, we declare the Queue using passive arg, in order to perform checks (Queue exists + has consumers)
> +    this.amqp.queue(destactorid, { passive : true}, function(queue) {
> +    })
> +    .on('error', function(err) {
> +      var err_msg = util.format('The queue [%s] does not exist (%s). The following message (type=\'%s\') *is LOST*: %s',
> +                                destactorid, err, type, JSON.stringify(message));
> +      logger.error(err_msg);
> +      self._storeNagiosEvent(new NagiosCheckResponse(NagiosCheckResponseCodes.ERROR, EVENTS_CONTROLLER_SUBSYSTEM, err_msg));
> +      if (socket) // Prevent new config deployment issues
> +      {
> +        socket.emit('error', 'Sorry, your message could not be delivered. Please contact support team.');


The users don't care about why it doesn't work. Logs are on the server.
The support team is the company who provides the website.
How is that handled right now when the WebService is not accessible?

—
Reply to this email directly or view it on GitHub<https://github.com/VirtuOz/smart-router/pull/10/files#r3206787>.