Skip to content

Commit

Permalink
Merge pull request #108 from aiven/hessu-websocket-fix
Browse files Browse the repository at this point in the history
websocket sender: Use a longer connection timeout and slower retries, version 2.4.1

#108
  • Loading branch information
rikonen authored Feb 1, 2022
2 parents 86e4c6d + e3586dd commit 9f1a540
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ journalpump 2.4.0 (2022-01-05)
* Updated polling algorithm to perform better when continiously receiving messages
* Handle invalidation event to prevent keeping deleted files

journalpump 2.3.6 (2021-10-20)
==============================
* Added Websocket sender

journalpump 2.3.0 (2020-06-15)
==============================
* Added Google Cloud Logging logs sender
Expand Down
2 changes: 1 addition & 1 deletion journalpump/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# This file is under the Apache License, Version 2.0.
# See the file `LICENSE` for details.
"""journalpump"""
__version__ = "2.4.0"
__version__ = "2.4.1"
4 changes: 2 additions & 2 deletions journalpump/senders/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
self.batch_message_overhead = 1
self.compression = compression
self.websocket_compression = websocket_compression
self.backoff = ExponentialBackoff(base=10, factor=1.8, maximum=60, jitter=True)
self.backoff = ExponentialBackoff(base=20, factor=1.8, maximum=90, jitter=True)
# prevent websockets from logging message contents when we're otherwise in DEBUG mode
logging.getLogger("websockets").setLevel(logging.INFO)

Expand Down Expand Up @@ -172,7 +172,7 @@ async def websocket_connect_coro(self):
max_size=MAX_KAFKA_MESSAGE_SIZE * 2,
)

async def websocket_connect(self, *, timeout=5):
async def websocket_connect(self, *, timeout=30):
connect_task = asyncio.create_task(self.websocket_connect_coro())
wait_for_stop_task = asyncio.create_task(self.wait_for_stop_event())

Expand Down

0 comments on commit 9f1a540

Please sign in to comment.