Search documentation of Metastatic

# Metastatic.Semantic.Domains.Queue (Metastatic v0.13.2)

View Source

Message queue operation patterns for semantic enrichment.

This module defines patterns for detecting message queue operations across multiple languages and queue libraries. Patterns are registered with the `Metastatic.Semantic.Patterns` registry at module load time.

## Supported Libraries

### Elixir

- Broadway - Data processing pipelines
- GenStage - Producer-consumer pipelines
- Oban - Background job processing
- Exq - Redis-backed job processing

### Python

- Celery - Distributed task queue
- RQ (Redis Queue) - Simple job queue
- Dramatiq - Background task processing
- Kombu - Messaging library for Python

### Ruby

- Sidekiq - Background job processing
- Resque - Redis-backed job processing
- Delayed::Job - Database-backed background jobs
- ActiveJob - Rails job framework

### JavaScript

- Bull/BullMQ - Redis-based queue
- Agenda - Job scheduling
- Bee-Queue - Redis job queue
- amqplib - RabbitMQ client

## Queue Operations

Operation | Description
--- | ---
`:publish` | Publish/send message to queue
`:consume` | Consume/receive message from queue
`:subscribe` | Subscribe to queue/topic
`:acknowledge` | Acknowledge message processing
`:reject` | Reject/nack message
`:enqueue` | Add job to queue
`:dequeue` | Remove job from queue
`:schedule` | Schedule delayed job
`:retry` | Retry failed job
`:process` | Process job/message

## Pattern Structure

Each pattern is a tuple of `{pattern, spec}` where:

- `pattern` - String or Regex to match function names
- `spec` - Map with operation details:
  - `:operation` - The queue operation type
  - `:framework` - The queue library identifier
  - `:extract_target` - Strategy for extracting queue/topic name

## Summary

### Functions

register_all()

Registers all queue patterns for all languages.

## Functions

# register_all()

    @spec register_all() :: :ok

Registers all queue patterns for all languages.

Called automatically when the module is loaded. Can also be called manually to re-register patterns (e.g., after clearing).