From 4a0834fde03b8e7e02a1570b0c174f09662222ec Mon Sep 17 00:00:00 2001 From: MK Software Date: Fri, 11 Oct 2024 12:38:21 +0200 Subject: [PATCH] fix: change max size of a topic message (from 10KB to 100KB) --- src/components/addTopicDialog.tsx | 2 +- src/store/topic.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/addTopicDialog.tsx b/src/components/addTopicDialog.tsx index 0f2325a..b802449 100644 --- a/src/components/addTopicDialog.tsx +++ b/src/components/addTopicDialog.tsx @@ -9,7 +9,7 @@ export const DEFAULT_TOPIC_VALUES: TopicFormikValues = { advancedValues: { acknowledgement: "LEADER", trackingEnabled: false, - maxMessageSize: 10240, + maxMessageSize: 102400, retentionTime: 1, }, topic: "", diff --git a/src/store/topic.ts b/src/store/topic.ts index 8298ff3..f59f139 100644 --- a/src/store/topic.ts +++ b/src/store/topic.ts @@ -19,6 +19,7 @@ import { addMetadata, withoutMetadataFields } from "./metadata"; import { Store } from "./store"; import { Subscription } from "./subscription"; import { ValidationError } from "./topics"; +import { DEFAULT_TOPIC_VALUES } from "../components/addTopicDialog"; export class Topic implements TopicModel { static GROUP_NAME_SEPARATOR = "."; @@ -43,7 +44,7 @@ export class Topic implements TopicModel { @observable migratedFromJsonType: boolean; @observable schemaIdAwareSerializationEnabled: boolean; @observable contentType: ContentType; - @observable maxMessageSize = 10240; + @observable maxMessageSize = DEFAULT_TOPIC_VALUES.advancedValues.maxMessageSize; @observable auth: AuthModel; @observable createdAt: number; @observable modifiedAt: number;