Asya supports pluggable message queue transports for actor communication.

Overview#

Transport layer is abstracted - sidecar implements transport interface, allowing different queue backends.

Supported Transports#

  • SQS: AWS-managed queue service
  • RabbitMQ: Self-hosted open-source message broker
  • Socket: Unix domain sockets on a shared Docker volume — local testing only ⚠️

Planned Transports#

  • Kafka: High-throughput distributed streaming
  • NATS: Cloud-native messaging system
  • Google Pub/Sub: GCP-managed messaging service

See KEDA scalers for potential integration targets.

Transport Configuration#

Transport is a cluster-level concern configured via the asya-crossplane Helm chart's transport value. The chart sets a defaultCompositionRef on the AsyncActor XRD, selecting the appropriate composition (SQS, RabbitMQ, Pub/Sub) for all actors in the cluster. Individual AsyncActor specs do not declare a transport field.

To override the cluster default for a specific actor, use Crossplane's built-in compositionRef:

apiVersion: asya.sh/v1alpha1
kind: AsyncActor
metadata:
  name: my-special-actor
compositionRef:
  name: asyncactor-rabbitmq  # explicit override
spec:
  image: my-actor:v1
  handler: handler.process

Transport Interface#

Sidecar implements (src/asya-sidecar/internal/transport/transport.go):

  • Receive(ctx, queueName): Receive single message from queue (blocking with long polling)
  • Send(ctx, queueName, body): Send message body to queue
  • Ack(ctx, message): Acknowledge successful processing
  • Nack(ctx, message): Negative acknowledge (requeue or move to DLQ)

Queue Management#

Queues automatically created by operator when AsyncActor reconciled.

Queue naming: asya-{namespace}-{actor_name}

Lifecycle:

  • Created when AsyncActor created
  • Deleted when AsyncActor deleted
  • Preserved when AsyncActor updated

Adding New Transport#

  1. Implement transport interface in src/asya-sidecar/internal/transport/
  2. Add transport configuration to operator
  3. Add KEDA scaler configuration
  4. Update documentation

See src/asya-sidecar/internal/transport/ for implementation examples.