mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-19 10:11:01 +02:00
Increase websocket limits to 50MB max message. Turn on Pulsar chunking by
default.
This commit is contained in:
parent
f4fd7183dd
commit
d3e9bb38e3
4 changed files with 7 additions and 2 deletions
|
|
@ -66,6 +66,7 @@ class ConsumerProducer(BaseProcessor):
|
||||||
self.producer = self.client.create_producer(
|
self.producer = self.client.create_producer(
|
||||||
topic=output_queue,
|
topic=output_queue,
|
||||||
schema=JsonSchema(output_schema),
|
schema=JsonSchema(output_schema),
|
||||||
|
chunking_enabled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.consumer = self.client.subscribe(
|
self.consumer = self.client.subscribe(
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class Producer(BaseProcessor):
|
||||||
self.producer = self.client.create_producer(
|
self.producer = self.client.create_producer(
|
||||||
topic=output_queue,
|
topic=output_queue,
|
||||||
schema=JsonSchema(output_schema),
|
schema=JsonSchema(output_schema),
|
||||||
|
chunking_enabled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def send(self, msg, properties={}):
|
def send(self, msg, properties={}):
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import threading
|
||||||
class Publisher:
|
class Publisher:
|
||||||
|
|
||||||
def __init__(self, pulsar_host, topic, schema=None, max_size=10,
|
def __init__(self, pulsar_host, topic, schema=None, max_size=10,
|
||||||
chunking_enabled=False):
|
chunking_enabled=True):
|
||||||
self.pulsar_host = pulsar_host
|
self.pulsar_host = pulsar_host
|
||||||
self.topic = topic
|
self.topic = topic
|
||||||
self.schema = schema
|
self.schema = schema
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,10 @@ class SocketEndpoint:
|
||||||
return web.HTTPUnauthorized()
|
return web.HTTPUnauthorized()
|
||||||
|
|
||||||
running = Running()
|
running = Running()
|
||||||
ws = web.WebSocketResponse()
|
|
||||||
|
# 50MB max message size
|
||||||
|
ws = web.WebSocketResponse(max_msg_size=52428800)
|
||||||
|
|
||||||
await ws.prepare(request)
|
await ws.prepare(request)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue