Free forever, no credit card.Get Started for Free →
← All posts
November 9, 2026 · 6 min read

Does Dramatiq Remember Between Runs? Messages Persist in the Broker. The Next Message Still Starts With Only Its Arguments.

Does Dramatiq Remember Between Runs? Messages Persist in the Broker. The Next Message Still Starts With Only Its Arguments. Dramatiq persists every message in its broker before a worker touches it. That persistence is real: a queued message survives a broker reboot, and a message in flight when a worker is terminated gets redelivered later. None of that persistence is a briefing for the next message. A new message arrives with the actor name and arguments it was sent with, and nothing the previ

Does Dramatiq Remember Between Runs? Messages Persist in the Broker. The Next Message Still Starts With Only Its Arguments.

Dramatiq persists every message in its broker before a worker touches it. That persistence is real: a queued message survives a broker reboot, and a message in flight when a worker is terminated gets redelivered later. None of that persistence is a briefing for the next message. A new message arrives with the actor name and arguments it was sent with, and nothing the previous actor learned is added to it.

What Dramatiq actually keeps in the broker

Sending an actor builds a message and publishes it to RabbitMQ or Redis, the two brokers Dramatiq supports. The message holds the queue name, the actor name, its args and kwargs, its options, a unique message ID, and a timestamp. Because messages cross the network, any argument sent to an actor must be JSON-encodable, so the practical shape is small and plain: an ID, a URL, a few values the actor can use to look the real record up itself.

Timing is stored with the message too. Calling send_with_options with a delay places the message in the future through an eta option, and it becomes available when that time arrives. Dramatiq itself offers delay, not a recurring calendar: repeated work is normally driven by an external scheduler sending a fresh message on each tick, and each of those messages is a new message with the arguments fixed at send time.

Failure leaves a long record. The Retries middleware automatically re-enqueues a failed message with exponential backoff: by default up to 20 retries, with backoff starting at 15 seconds and capped at 7 days, and the guide notes a failing message can keep retrying for up to about 30 days from when it was first enqueued. An age limit can expire old messages instead. Once a message exceeds its retry or age limits, it moves to the dead letter queue, where it is kept for up to 7 days and then automatically dropped from the broker, available in that window for a person to inspect and requeue by hand.

Results are narrower, and off by default. Dramatiq can store an actor's return value in Redis or Memcached through the Results middleware, but that middleware is not turned on by default, actors must opt in, and stored results expire after 10 minutes by default unless a longer result_ttl is set. Callbacks can fire inside one planned flow, which helps one piece of work finish. None of it attaches a readable history to the actor for the next independent message.

What the next message starts with

A worker pops a message, reads its actor name and arguments, and runs the function. If a scheduler sends the same actor every morning with the same arguments, every run receives the same starting point, whatever yesterday's run discovered or promised.

There is no step where Dramatiq reads yesterday's messages and briefs today's. A completed actor does not leave a summary attached to its queue for the next message to retrieve. Its arguments sit in the broker until it runs, its failure history sits in retry counts and, at the end, the dead letter queue, and a stored result, if results were enabled at all, expires in minutes.

Take a scheduled actor that reviews new vendor messages each morning and drafts replies with an AI model. Tomorrow's message starts from its arguments again. It does not know that one vendor already sent the missing document, that a person edited a draft and explained the correction, or that another thread was promised an answer today. It can ask for the same document again, neatly worded, with complete confidence.

The store operators end up building by hand

The usual fix is a second store next to the broker. A table holds the last summary per customer, and extra keys hold open items and flags for work already done. Code at the top of the actor reads those stores, assembles a briefing, and hands it to the AI step. The memory becomes a side system to design, test, and keep correct.

That side store also keeps less than the agent needs. A summary row is a run compressed to its ending. The next decision often turns on the middle: the original request, the option that was rejected, the correction a person gave, and the reason the decision went one way instead of another. If only the final status was saved, the next run inherits the conclusion with none of the exchange behind it.

Scope narrows it further. The table belongs to that one Python service. The same operator usually runs agents elsewhere too: another queue, an n8n or Make scenario, and AI tools used directly in chat. Each place keeps its own partial record, and a decision made in one never reaches the morning actor unless someone copies it across by hand.

A memory that lives outside the message

The cleaner shape is to keep execution in Dramatiq and give the agent a memory outside any single message or tool, which every run reads at the start and updates at the end.

Vilix AI is built for that layer. It is cloud-hosted with zero infrastructure to run, so there is no extra store to provision, secure, or keep alive between schedules. It is available over MCP, so the same memory follows the agent across a Dramatiq worker, another automation platform, and the AI tools used directly. One memory, reachable everywhere the work happens.

Vilix AI stores full conversation history, not just facts or final results. A scheduled agent can revisit the actual exchange: what was asked, what was tried, what a person corrected, and what was settled. That history is what stops a second run from asking a settled question again, repeating a follow-up that already went out, or drafting against an instruction that changed in conversation yesterday.

In a Dramatiq setup the pattern stays small. Before the actor calls the model, it retrieves the relevant history for that customer or workflow, does the work with the past in view, and saves the new exchange and outcome back before it finishes. Dramatiq keeps queuing and retrying, and the continuing story lives in the memory layer, where the next run in any tool can find it.

Data in Vilix AI can be exported or deleted at any time. The free plan is free forever, and Pro offers a 7-day trial with no credit card required, so the pattern can be tested on one recurring actor first.

The short answer

Does Dramatiq remember between runs? In the storage sense, yes: queued and delayed messages persist, failed messages retry with backoff, and dead letters are kept for up to 7 days. In the working sense an AI agent needs, no: the next message receives only its arguments and starts fresh, unless code you write fetches the past and rebuilds a briefing for it.

Let Dramatiq do queuing, delays, and retries. Give the agents inside those actors a shared memory outside them, and each run can start where the last one left off.

Start at Vilix AI.

Get Started for Free

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Get Started for Free

Free forever, no credit card.

Keep reading
Does Agenda Remember Between Runs? Jobs Are Stored in MongoDB. The Next Job Still Starts With Only Its Data.

Does Agenda Remember Between Runs? Jobs Are Stored in MongoDB. The Next Job Still Starts With Only Its Data. Agenda remembers jobs very well. Every job is written to MongoDB before it runs, so schedules survive restarts, crashes, and deploys. That persistence is real, and it is also easy to misread. When a job runs, Agenda hands the handler one job document: a name, a schedule, and the data object that was saved with that job. What the last run figured out is not in that document unless the las

Does Hangfire Remember Between Runs? Jobs Are Stored in a Database. The Next Job Still Starts With Only Its Arguments.

Does Hangfire Remember Between Runs? Jobs Are Stored in a Database. The Next Job Still Starts With Only Its Arguments. Hangfire remembers jobs very well. It writes every job to persistent storage before it runs, tracks each job through its states, and can show the full history in a dashboard. None of that makes the job itself remember. When a job runs, Hangfire reads back one serialized method call and its arguments, creates the job class, calls the method, and records the outcome. Whatever the

Does Quartz Remember Between Runs? A Job Store Saves the Schedule and a Small Map. The Next Job Still Starts as a New Instance.

Does Quartz Remember Between Runs? A Job Store Saves the Schedule and a Small Map. The Next Job Still Starts as a New Instance. Quartz can remember a schedule across a restart, and with the right annotation it can carry a small map of values from one execution to the next. Neither fact makes a job itself remember. Every time a trigger fires, Quartz creates a new instance of the job class, calls execute, and drops that instance when the run ends. Anything the previous run reasoned through, unles