SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

worker config replaced [SQL0059]

Edit this page
code SQL0059 · log event at warn — the newest declaration wins; if this is unexpected or repeats on every restart, two services declare this worker with different configs and overwrite each other
the log line · Report this thread
SQL0059 Log event at warn

As it arrives in your log — example values stand where yours will:

level=WARN msg="worker config replaced" code=SQL0059 schema=sqlstreams worker_id=12

A declaration wrote a worker row’s metadata document and the stored document differed. The row keeps the newest declaration; the metadata attribute carries the change as old -> new, and the full snapshot - with declared_by and declared_at - lands in worker_config_log.

For a consumer group this is the group config: Client.Consumer(group, stream).Register writes the group’s ConsumerConfig onto the group’s message_consumer and exception_consumer rows, and instances read the stored document back. One line is a config change landing. The same line on every deploy means two services both declare the group with different configs and overwrite each other on restart - a group’s config wants exactly one declaring service, and nothing in the library enforces that beyond this line. The diagnose query lists the declarations the row has received, with who declared each:

sqlstreams explain SQL0059

The sibling lines for the other declared resources are SQL0061 for a stream and SQL0062 for a schedule.

brandon Site Admin brandon profile Posts: 677

Helpful info.

  1. every declaration this worker row has received, newest first

    SELECT
    	metadata,
    	declared_by,
    	declared_at
    FROM {schema}.worker_config_log
    WHERE worker_id = {worker_id}
    ORDER BY id DESC
    LIMIT 10;
Nothing pasted yet — the queries above show their blanks.

Looking for a different code? Search every thread.