The Notify Service is Argos Mesh’s notification delivery system that consumes security alerts from the Sentinel service and delivers them to operators. It acts as the final stage in the security event pipeline, ensuring that critical alerts are properly logged and can be extended to support multiple notification channels.
Notify is designed as a lightweight, stateless service that focuses solely on alert delivery without external dependencies.
The service configures its messaging infrastructure:
@Configurationpublic class RabbitMQConfig { public static final String QUEUE_ALERT = "argos.alert.queue"; public static final String ALERT_EXCHANGE = "alert.exchange"; public static final String RK_ALERT = "argos.alert.#"; @Bean public Queue alertQueue() { return new Queue(QUEUE_ALERT, true); } @Bean public TopicExchange exchange() { return new TopicExchange(ALERT_EXCHANGE); } @Bean public Binding binding(Queue alertQueue, TopicExchange exchange) { return BindingBuilder.bind(alertQueue).to(exchange).with(RK_ALERT); }}
Queue Name:argos.alert.queueExchange:alert.exchange (Topic)Routing Key Pattern:argos.alert.#Durable:true (survives broker restarts)The wildcard pattern argos.alert.# allows the service to receive all alert types:
The Notify service is designed to be extended with multiple notification channels:
Email Notifications
Send alerts to on-call engineers via SMTP
@Servicepublic class EmailNotifier { @Autowired private JavaMailSender mailSender; public void sendAlert(AlertInternalEvent alert) { // Email implementation }}
Slack Integration
Post alerts to Slack channels using webhooks
@Servicepublic class SlackNotifier { @Value("${slack.webhook.url}") private String webhookUrl; public void sendAlert(AlertInternalEvent alert) { // Slack API call }}
SMS Alerts
Send critical alerts via Twilio or AWS SNS
@Servicepublic class SmsNotifier { @Autowired private TwilioClient twilioClient; public void sendAlert(AlertInternalEvent alert) { // SMS implementation }}
Webhook Integration
POST alerts to external monitoring systems
@Servicepublic class WebhookNotifier { @Autowired private RestTemplate restTemplate; public void sendAlert(AlertInternalEvent alert) { // HTTP POST to webhook }}
RabbitMQ connection details are inherited from the default Spring Boot configuration:
# Add these if not using defaultsspring.rabbitmq.host=message_brokerspring.rabbitmq.port=5672spring.rabbitmq.username=adminspring.rabbitmq.password=admin123