Skip to content

Auto-reconnect to Stomp when connection lost#101

Merged
callumforrester merged 15 commits intomainfrom
stomp-reconnect
Mar 8, 2023
Merged

Auto-reconnect to Stomp when connection lost#101
callumforrester merged 15 commits intomainfrom
stomp-reconnect

Conversation

@callumforrester
Copy link
Copy Markdown
Contributor

@callumforrester callumforrester commented Mar 3, 2023

Closes #94

Changes:

  • Automatically attempt to reconnect every few seconds (default 10) if stomp connection is lost.
  • Allow calling subscribe() on a stomp messaging template before calling connect(), subscription is deferred internally until after connection. This allows for a nicer, declarative service setup.
  • Write system tests for StompMessagingTemplate
  • Add mechanism to skip system tests if ActiveMQ is not available (e.g. local dev)
  • Add activemq as a service in the CI when running tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2023

Codecov Report

Merging #101 (e7cf910) into main (71e54a2) will increase coverage by 3.42%.
The diff coverage is 82.35%.

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   56.67%   60.10%   +3.42%     
==========================================
  Files          39       39              
  Lines        1108     1148      +40     
==========================================
+ Hits          628      690      +62     
+ Misses        480      458      -22     
Impacted Files Coverage Δ
src/blueapi/service/app.py 40.35% <0.00%> (ø)
src/blueapi/messaging/stomptemplate.py 91.22% <84.00%> (+26.36%) ⬆️
src/blueapi/messaging/base.py 69.81% <0.00%> (+11.32%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@callumforrester callumforrester merged commit 8e95744 into main Mar 8, 2023
@callumforrester callumforrester deleted the stomp-reconnect branch March 8, 2023 10:26
keithralphs pushed a commit that referenced this pull request Apr 28, 2023
* Working reconnect

* Working tests for stomp template

* Skip stomp tests with flag

* Include activemq server in stomp tests (CI)
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.

Worker does not react when stomp connection is lost

1 participant