mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-04 12:52:36 +02:00
Messaging fabric plugins (#592)
* Plugin architecture for messaging fabric * Schemas use a technology neutral expression * Schemas strictness has uncovered some incorrect schema use which is fixed
This commit is contained in:
parent
1865b3f3c8
commit
34eb083836
100 changed files with 2342 additions and 828 deletions
|
|
@ -143,7 +143,7 @@ class Processor(AsyncProcessor):
|
|||
|
||||
self.librarian_request_consumer = Consumer(
|
||||
taskgroup = self.taskgroup,
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
flow = None,
|
||||
topic = librarian_request_queue,
|
||||
subscriber = id,
|
||||
|
|
@ -153,7 +153,7 @@ class Processor(AsyncProcessor):
|
|||
)
|
||||
|
||||
self.librarian_response_producer = Producer(
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
topic = librarian_response_queue,
|
||||
schema = LibrarianResponse,
|
||||
metrics = librarian_response_metrics,
|
||||
|
|
@ -161,7 +161,7 @@ class Processor(AsyncProcessor):
|
|||
|
||||
self.collection_request_consumer = Consumer(
|
||||
taskgroup = self.taskgroup,
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
flow = None,
|
||||
topic = collection_request_queue,
|
||||
subscriber = id,
|
||||
|
|
@ -171,7 +171,7 @@ class Processor(AsyncProcessor):
|
|||
)
|
||||
|
||||
self.collection_response_producer = Producer(
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
topic = collection_response_queue,
|
||||
schema = CollectionManagementResponse,
|
||||
metrics = collection_response_metrics,
|
||||
|
|
@ -183,7 +183,7 @@ class Processor(AsyncProcessor):
|
|||
)
|
||||
|
||||
self.config_request_producer = Producer(
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
topic = config_request_queue,
|
||||
schema = ConfigRequest,
|
||||
metrics = config_request_metrics,
|
||||
|
|
@ -195,7 +195,7 @@ class Processor(AsyncProcessor):
|
|||
|
||||
self.config_response_consumer = Consumer(
|
||||
taskgroup = self.taskgroup,
|
||||
client = self.pulsar_client,
|
||||
backend = self.pubsub,
|
||||
flow = None,
|
||||
topic = config_response_queue,
|
||||
subscriber = f"{id}-config",
|
||||
|
|
@ -299,14 +299,13 @@ class Processor(AsyncProcessor):
|
|||
collection = processing.collection
|
||||
),
|
||||
data = base64.b64encode(content).decode("utf-8")
|
||||
|
||||
)
|
||||
schema = Document
|
||||
|
||||
logger.debug(f"Submitting to queue {q}...")
|
||||
|
||||
pub = Publisher(
|
||||
self.pulsar_client, q, schema=schema
|
||||
self.pubsub, q, schema=schema
|
||||
)
|
||||
|
||||
await pub.start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue