Skip to content

Feature Request: Persistent Queue Support in CustomerIO Python SDK #107

@rjoshi

Description

@rjoshi

Description

We are using the CustomerIO Python SDK in a Django application hosted on Azure App Services. Since these services use ephemeral containers, the process can be unexpectedly terminated, causing message loss in the queue.

To improve reliability, we need an option to persist the queue using a Redis-backed configuration or any other durable mechanism.

Current Behavior

  • The queue exists only in-memory.
  • If the container is restarted or crashes, all queued messages are lost.
  • This affects email/event delivery and reliability in production.

Expected Behavior

  • Allow the SDK to use Redis (or another persistent store) as a backing queue.
  • Ensure queued messages survive container restarts.
  • Provide configurable options to enable persistent queuing.

Proposed Solution

  • Introduce an optional setting to configure Redis as the queue backend.
  • If Redis is configured, queue messages should be persisted and retried even after a restart.
  • Maintain existing in-memory behavior as a fallback.
  • Use Case

This feature is critical for teams running CustomerIO in serverless or containerized environments (such as Azure App Services, AWS Fargate, etc.), where unexpected restarts can lead to message loss.

Additional Context

  • We use CustomerIO Python SDK in a Django app.
  • Running on Azure App Services with ephemeral containers.
  • Redis is already available in our stack and could serve as a robust queue backend.

Would love to hear thoughts from the maintainers on feasibility! 🚀

Thank you! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions