Skip to main content

Overview

This page documents the complete communication flows between Job Manager components, including REST API calls and Kafka event messaging. All Kafka messages use AVRO format for schema-based serialization.
Kafka Topic Naming Convention:
  • Request topics: JM_* or JA_* prefix
  • Reply topics: *_REPLY suffix

Company Registration

Multi-step registration flow with Kafka-based profile creation.

Flow Details

1

Frontend Submission

User submits registration form with company details
2

Auth Record Creation

Auth Service creates authentication record in database
3

Profile Event

Auth publishes JM_COMPANY_REGISTRATION (AVRO) to Profile Service
4

Profile Creation

Profile Service consumes event, creates profile record in database
5

Reply Event

Profile publishes JM_COMPANY_REGISTRATION_REPLY (AVRO) to Auth
6

Response

Auth responds to REST request, Frontend redirects to Login

Company Login

Authentication flow with JWT token generation and caching.

Flow Details

1

Credential Submission

User submits login form with email and password
2

Verification

Auth Service verifies credentials against database
3

Token Generation

Auth creates auth_token and refresh_token
4

Token Caching

Tokens stored in Redis Token Cache Database
5

Response

JWE tokens set in browser cookies for session management

Company Profile Management

Update Company Profile

Direct REST update to Profile Service. Media upload with Kafka notification to Profile Service.
URL Format: [company_id]-logo-[filename.*]

Upload/Update Images and Videos

Media upload with database record persistence.
URL Format: [company_id]-[image/video]-[filename.*]

Job Post Management

Display Applications of Job Post

Cross-system query to JA Backend for application data.

Archive Application

Update application status with cross-system synchronization.

Create/Update Job Post

Job post lifecycle with skill tag management.
The JobPost_SkillTag index table is stored inside the Job Post Database.

Search/Manage Skill Tags

Dynamic tag management during job post editing.

Real-time Notification on Job Post Changes

Notify matching applicants when job posts are created or updated.

Applicant Search and Marker

Applicant Search (Search Filter Form)

Cross-system search query to JA Backend.

Applicant Marker

Mark applicants as Favorite or Warning.
The Company_Applicant_Marker table is stored inside the Company Profile Database.

Premium Company Subscription

Premium Subscription Payment

Payment processing with subscription status update.

JA Subscription (Cross-System)

Handle payment requests from Job Applicant system.

Subscription Expiration Notification

Automated expiration handling with email and real-time notifications.

Extend Subscription

Renewal flow with email notification update.

Applicant Profile Update Notification

Notify premium companies when matching applicants update profiles.

Error Handling Flows

This section documents how the system handles failures, retries, and error recovery across different scenarios.

Authentication Failure Flow

Handles invalid credentials, account lockout, and token expiration.

Kafka Message Failure & Retry Flow

Handles message delivery failures with exponential backoff retry.

Payment Failure Flow

Handles payment processing failures and rollback.

Cross-Shard Query Failure Flow

Handles failures when querying across database shards.

WebSocket Notification Failure Flow

Handles real-time notification delivery failures.

Service Circuit Breaker Pattern

Prevents cascade failures when dependent services are unavailable.

Error Response Codes

ScenarioHTTP CodeError CodeRecovery Action
Invalid credentials401INVALID_CREDENTIALSRetry with correct credentials
Account locked401ACCOUNT_LOCKEDWait 15 minutes or contact support
Token expired401TOKEN_EXPIREDRefresh token or re-login
Validation error400VALIDATION_ERRORFix input and retry
Payment declined400PAYMENT_DECLINEDTry different payment method
Resource not found404NOT_FOUNDCheck resource ID
Rate limited429RATE_LIMITEDWait and retry with backoff
Service unavailable503SERVICE_UNAVAILABLERetry after delay
Partial data206PARTIAL_CONTENTProceed with warning

Kafka Topics Reference

JM (Job Manager) Topics

TopicPublisherConsumerPurpose
JM_COMPANY_REGISTRATIONAuthProfileCreate company profile
JM_COMPANY_REGISTRATION_REPLYProfileAuthConfirm profile created
JM_LOGO_UPDATEDMediaProfileUpdate logo URL
JM_APPLICATION_REQUESTEDJob PostJARequest application data
JM_APPLICATION_REQUESTED_REPLYJAJob PostReturn application data
JM_APPLICATION_STATUS_UPDATEDJob PostJAUpdate application status
JM_APPLICATION_STATUS_UPDATED_REPLYJAJob PostConfirm status update
JM_POST_ADDEDJob PostJA NotificationNew job post notification
JM_POST_UPDATEDJob PostJA NotificationUpdated job post notification
JM_APPLICANT_SEARCH_REQUESTEDApplicant DiscoveryJASearch applicants
JM_APPLICANT_SEARCH_REPLYJAApplicant DiscoveryReturn search results
JM_SUBSCRIPTION_PAIDPaymentAuthUpdate subscription status
JM_SUBSCRIPTION_PAID_REPLYAuthPaymentConfirm status update
JM_SUBSCRIPTION_EXPIREDAuthNotificationExpiration alert
JM_SUBSCRIPTION_EXPIRED_REPLYNotificationAuthConfirm notification sent
JM_PROFILE_MATCHEDJob PostAuthMatched company IDs
JM_APPLICANT_MATCHEDAuthNotificationNotify premium companies

JA (Job Applicant) Topics

TopicPublisherConsumerPurpose
JA_PROFILE_ADDEDJAJob PostNew applicant profile
JA_PROFILE_UPDATEDJAJob PostUpdated applicant profile
PAYMENT_REQUESTEDJAPaymentApplicant payment request
PAYMENT_REPLIEDPaymentJAPayment result