Skip to content

Stability fixes phases 1-4: errors, I/O sync, connection loss, quorum#109

Open
bafgion wants to merge 17 commits into
BITERP:masterfrom
bafgion:fix/stability-and-features
Open

Stability fixes phases 1-4: errors, I/O sync, connection loss, quorum#109
bafgion wants to merge 17 commits into
BITERP:masterfrom
bafgion:fix/stability-and-features

Conversation

@bafgion

@bafgion bafgion commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Комплексные исправления стабильности и API (фазы 1–4, v2.3→v2.6). Протестировано в форке: CI Entry (28 матриц Linux/Windows), релизы v2.4.0.11 / v2.5.0.15 / v2.6.0.17.

Закрываемые issues (27): #12, #15, #24, #26, #49, #51, #54, #58, #64, #65, #77, #79, #82, #83, #88, #89, #90, #93, #94, #95, #98, #99, #100, #101, #103, #104, #105 + метод BatchPublish (#106).

Базовые улучшения (v2.3)

  • Устранён busy-wait в event loop (Windows/Linux) (#105).
  • AMQP heartbeat на Windows и Linux (#49).
  • BasicCancel (#15, #58): отмена consumer на брокере, сброс consume-канала.
  • BasicReject (#64): необязательный параметр requeue.
  • BasicPublish / BatchPublish (#12, #106): publisher confirms, корректная длина тела (message.size()), большие сообщения (#103, #104).
  • GetHeaders (#101), GetQueueMessageCount (#83).
  • Connect: таймаут из параметра API (по умолчанию 5 с).
  • CI: workflow Entry (Linux + Windows + RabbitMQ service).

Фаза 1 — ошибки без падений (v2.4)

  • BasicConsume: проверка существования очереди (#107).
  • BasicPublish/BatchPublish: проверка exchange, mandatory, returned messages (#12).
  • BasicConsumeMessage: Ложь + GetLastError вместо исключений (#54, #98).

Фаза 2 — стабильность и I/O (v2.4)

  • Синхронизация AMQP I/O (ioMutex / withIoLock) (#51, #103, #104).
  • Безопасный shutdown / clear() (#95, #79, #94).
  • Валидация типа порта в Connect (#24).

Фаза 3 — обрыв связи (v2.5)

  • Детекция потери TCP/AMQP (notifyLost), разблокировка loop(), ошибка в BasicConsumeMessage (#88).
  • Linux: AMQP heartbeat в event-loop (#49).
  • Прогрев каналов в Connect — гонка Connect→DeclareExchange (#65).
  • Graceful shutdown: ожидание AMQP close handshake (#26).
  • Windows: однократная инициализация SSL (#89), снижение CPU в idle read-loop (#105).

Фаза 4 — v2.6

  • Quorum-очереди: QoS без global, per-consumer при selectSize > 0 (#90).
  • Убрана задержка после Ack/Reject (#99).
  • LoopCallbackGuard после AMQP timeout — соединение не помечается потерянным (#77).
  • BasicConsumeMessage: таймаут / пустая очередь / большие тела — Ложь + GetLastError (#93, #98).
  • Валидация длины routing key / exchange / queue (255 байт) (#82).
  • Linux: ioMutex вокруг TcpConnection::process() (#51).
  • CI: сборка в debian:bullseye-slim (glibc 2.31) на ubuntu-22.04 runner (#100).
  • Повторный Connect и переоткрытие канала после NOT_FOUND (#79, #65, #12).

Не входит в PR (enhancement / вопросы)

#1, #4, #10, #20, #23, #46, #70, #75 — новый API; #5, #18, #39, #44, #66, #68, #78, #81, #84, #87, #92 — требуют уточнения или документации.

Test plan

  • CI Entry: 45 passed, 2 skipped (Linux debian:bullseye-slim + Windows, 28 платформ 1С)
  • Тесты: quorum, reconnect, immediate Declare*, publish+consume, missing exchange (×2), large message 500KB
  • Ручная проверка на Windows Server 2022
  • Docker debian:bullseye-slim / ubuntu:20.04 — сборка и pytest локально
  • CentOS 7.9 / прод rphost — ожидает проверки (#79)

Fork

Разработка и релизы: bafgion/PinkRabbitMQ · CHANGELOG

bafgion and others added 12 commits June 24, 2026 12:50
Eliminate busy-wait in event loops, add AMQP heartbeats on Windows, fix BasicCancel/BasicReject/BasicPublish, add BatchPublish and GetQueueMessageCount, and add CI with Linux/Windows tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
…essageCount.

Store callback state in member fields instead of stack references, and align pytest with optional BasicReject and queue count semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove duplicate ci.yml, upload build artifacts on fork instead of releases, and stabilize BasicConsume after BatchPublish.

Co-authored-by: Cursor <cursoragent@cursor.com>
Deactivate confirm and consume handlers after each loop so BatchPublish cannot interrupt BasicConsume in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
…als.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove fork-only artifact upload and repository gate on the release step.

Co-authored-by: Cursor <cursoragent@cursor.com>
…e permissions.

Co-authored-by: Cursor <cursoragent@cursor.com>
…event loop.

Co-authored-by: Cursor <cursoragent@cursor.com>
…umer cleanup on clear.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@bafgion bafgion changed the title Fix Windows Server 2022 stability, API fixes, CI Stability fixes phases 1-3: errors, I/O sync, connection loss Jun 24, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
bafgion and others added 2 commits June 25, 2026 10:31
…itHub.

Co-authored-by: Cursor <cursoragent@cursor.com>
…inux I/O sync.

Fixes repeat BasicPublish after NOT_FOUND, reconnect races, frame size exceeded on Linux, and adds regression tests. Bump CI version to 2.6.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bafgion bafgion changed the title Stability fixes phases 1-3: errors, I/O sync, connection loss Stability fixes phases 1-4: errors, I/O sync, connection loss, quorum Jun 25, 2026
bafgion and others added 2 commits June 25, 2026 11:56
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant