Skip to content

Commit

Permalink
Merge branch 'main' into mqtt-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 authored Dec 18, 2024
2 parents 2f9827e + 47baf11 commit 4a040e7
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/uiux_improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: UI/UX improvement
about: Create a report to help us improve
title: ''
labels: 'UI/UX'
assignees: ''
---
**Summary**
Provide a brief description of the issue or improvement.

**Current Behavior**
Describe how the feature or UI element currently works.

**Desired Behavior**
Explain what the ideal experience should be.

**Steps to Reproduce (if reporting an issue)**
List the steps required to replicate the problem.

**Proposed Solution (for improvements)**
Suggest how to resolve the issue or implement the improvement.

**Screenshots/Mockups**
Add visuals to clarify the issue or illustrate your suggestion.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- New UI for management interface [#821](https://github.com/cloudamqp/lavinmq/pull/821)
- Use sent/received bytes instead of messages to trigger when other tasks can run [#863](https://github.com/cloudamqp/lavinmq/pull/863)

### Fixed

- Queues will no longer be closed if file size is incorrect. Fixes [#669](https://github.com/cloudamqp/lavinmq/issues/669)
- Dont redeclare exchange in java client test [#860](https://github.com/cloudamqp/lavinmq/pull/860)
- Removed duplicate metric rss_bytes [#881](https://github.com/cloudamqp/lavinmq/pull/881)
- Release leadership on graceful shutdown [#871](https://github.com/cloudamqp/lavinmq/pull/871)
- Rescue more exceptions while reading msg store on startup [#865](https://github.com/cloudamqp/lavinmq/pull/865)

### Added

- Added some logging for followers [#885](https://github.com/cloudamqp/lavinmq/pull/885)

## [2.0.2] - 2024-11-25

### Fixed

- Queues will no longer be closed if file size is incorrect. Fixes [#669](https://github.com/cloudamqp/lavinmq/issues/669)
Expand Down
10 changes: 10 additions & 0 deletions src/lavinmq/clustering/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module LavinMQ
@unix_http_proxy : Proxy?
@unix_mqtt_proxy : Proxy?
@socket : TCPSocket?
@streamed_bytes = 0_u64

def initialize(@config : Config, @id : Int32, @password : String, proxy = true)
System.maximize_fd_limit
Expand Down Expand Up @@ -219,6 +220,7 @@ module LavinMQ
private def stream_changes(socket, lz4)
acks = Channel(Int64).new(@config.clustering_max_unsynced_actions)
spawn send_ack_loop(acks, socket), name: "Send ack loop"
spawn log_streamed_bytes_loop, name: "Log streamed bytes loop"
loop do
filename_len = lz4.read_bytes Int32, IO::ByteFormat::LittleEndian
next if filename_len.zero?
Expand Down Expand Up @@ -246,6 +248,7 @@ module LavinMQ
@files.delete("#{filename}.tmp").try &.close
end
ack_bytes = len.abs + sizeof(Int64) + filename_len + sizeof(Int32)
@streamed_bytes &+= ack_bytes
acks.send(ack_bytes)
end
ensure
Expand All @@ -266,6 +269,13 @@ module LavinMQ
socket.close rescue nil
end

private def log_streamed_bytes_loop
loop do
sleep 30.seconds
Log.info { "Total streamed bytes: #{@streamed_bytes}" }
end
end

private def authenticate(socket)
socket.write Start
socket.write_bytes @password.bytesize.to_u8, IO::ByteFormat::LittleEndian
Expand Down
2 changes: 2 additions & 0 deletions static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ main {
justify-self: center;
margin-bottom: 20px;
position: relative;
margin-left: auto;
margin-right: auto;
}

main.main-grid {
Expand Down

0 comments on commit 4a040e7

Please sign in to comment.