limit msg size to 0.5MB

This commit is contained in:
2026-03-10 08:36:18 +07:00
parent 54ecc811f7
commit 99f1b2e720
4 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
name = "NATSBridge"
uuid = "f2724d33-f338-4a57-b9f8-1be882570d10"
version = "0.5.2"
version = "0.5.3"
authors = ["narawat <narawat@gmail.com>"]
[deps]

View File

@@ -47,7 +47,7 @@ using NATS, JSON, Arrow, HTTP, UUIDs, Dates, Base64, PrettyPrinting, DataFrames
# ---------------------------------------------- 100 --------------------------------------------- #
# Constants
const DEFAULT_SIZE_THRESHOLD = 1_000_000 # 1MB - threshold for switching from direct to link transport
const DEFAULT_SIZE_THRESHOLD = 500_000 # 0.5MB - threshold for switching from direct to link transport
const DEFAULT_BROKER_URL = "nats://localhost:4222" # Default NATS server URL
const DEFAULT_FILESERVER_URL = "http://localhost:8080" # Default HTTP file server URL for link transport

View File

@@ -19,9 +19,9 @@ const arrow = require('apache-arrow');
// ---------------------------------------------- Constants ---------------------------------------------- //
/**
* Default size threshold for switching from direct to link transport (1MB)
* Default size threshold for switching from direct to link transport (0.5MB)
*/
const DEFAULT_SIZE_THRESHOLD = 1_000_000;
const DEFAULT_SIZE_THRESHOLD = 500_000;
/**
* Default NATS server URL

View File

@@ -34,9 +34,9 @@ except ImportError:
# ---------------------------------------------- Constants ---------------------------------------------- #
"""
Default size threshold for switching from direct to link transport (1MB)
Default size threshold for switching from direct to link transport (0.5MB)
"""
DEFAULT_SIZE_THRESHOLD = 1_000_000
DEFAULT_SIZE_THRESHOLD = 500_000
"""
Default NATS server URL