trustgraph-base 2.3.13__tar.gz → 2.3.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/PKG-INFO +1 -1
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/backend.py +21 -25
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/pulsar_backend.py +5 -5
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/rabbitmq_backend.py +96 -123
- trustgraph_base-2.3.14/trustgraph/base_version.py +1 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/PKG-INFO +1 -1
- trustgraph_base-2.3.13/trustgraph/base_version.py +0 -1
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/README.md +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/pyproject.toml +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/setup.cfg +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/api.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/async_bulk_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/async_flow.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/async_metrics.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/async_socket_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/bulk_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/collection.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/config.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/exceptions.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/explainability.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/flow.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/knowledge.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/library.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/metrics.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/socket_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/api/types.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/agent_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/agent_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/async_processor.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/cassandra_config.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/chunking_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/collection_config_handler.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/config_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/consumer.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/consumer_spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/document_embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/dynamic_tool_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/flow.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/flow_processor.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/graph_rag_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/librarian_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/llm_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/logging.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/metrics.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/parameter_spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/processor_group.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/producer.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/producer_spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/prompt_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/publisher.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/pubsub.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/request_response_spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/row_embeddings_query_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/serialization.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/structured_query_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/subscriber.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/subscriber_spec.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/text_completion_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/tool_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/tool_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/tool_service_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/triples_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/base.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/config_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/row_embeddings_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/exceptions.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/ar.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/en.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/es.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/he.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/hi.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/pt.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/ru.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/sw.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/tr.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/i18n/packs/zh-cn.json +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/document.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/log_level.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/registry.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/agent.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/base.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/collection.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/config.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/diagnosis.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/document_loading.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/embeddings.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/embeddings_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/flow.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/knowledge.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/library.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/metadata.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/nlp_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/primitives.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/prompt.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/retrieval.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/rows_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/sparql_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/structured_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/text_completion.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/tool.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/messaging/translators/triples.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/objects/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/objects/field.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/objects/object.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/agent.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/namespaces.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/triples.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/uris.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/provenance/vocabulary.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/rdf.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/core/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/core/metadata.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/core/primitives.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/core/topic.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/document.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/embeddings.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/graph.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/knowledge.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/nlp.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/object.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/rows.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/knowledge/structured.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/__init__.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/agent.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/collection.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/config.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/diagnosis.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/flow.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/library.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/llm.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/lookup.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/nlp_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/prompt.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/retrieval.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/rows_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/sparql_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/storage.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/structured_query.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/schema/services/tool_service.py +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/entry_points.txt +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph_base.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.14
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -121,7 +121,7 @@ class PubSubBackend(Protocol):
|
|
|
121
121
|
Create a producer for a topic.
|
|
122
122
|
|
|
123
123
|
Args:
|
|
124
|
-
topic:
|
|
124
|
+
topic: Queue identifier in class:topicspace:topic format
|
|
125
125
|
schema: Dataclass type for messages
|
|
126
126
|
**options: Backend-specific options (e.g., chunking_enabled)
|
|
127
127
|
|
|
@@ -159,59 +159,55 @@ class PubSubBackend(Protocol):
|
|
|
159
159
|
"""
|
|
160
160
|
...
|
|
161
161
|
|
|
162
|
-
async def
|
|
162
|
+
async def create_topic(self, topic: str) -> None:
|
|
163
163
|
"""
|
|
164
|
-
|
|
164
|
+
Create the broker-side resources for a logical topic.
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
For RabbitMQ this creates a fanout exchange. For Pulsar this is
|
|
167
|
+
a no-op (topics auto-create on first use).
|
|
168
168
|
|
|
169
|
-
Idempotent — creating an already-existing
|
|
169
|
+
Idempotent — creating an already-existing topic succeeds silently.
|
|
170
170
|
|
|
171
171
|
Args:
|
|
172
|
-
topic:
|
|
173
|
-
subscription: Subscription/consumer group name
|
|
172
|
+
topic: Topic identifier in class:topicspace:topic format
|
|
174
173
|
"""
|
|
175
174
|
...
|
|
176
175
|
|
|
177
|
-
async def
|
|
176
|
+
async def delete_topic(self, topic: str) -> None:
|
|
178
177
|
"""
|
|
179
|
-
Delete a
|
|
178
|
+
Delete a topic and discard any in-flight messages.
|
|
180
179
|
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
For RabbitMQ this deletes the fanout exchange; consumer queues
|
|
181
|
+
lose their binding and drain naturally.
|
|
183
182
|
|
|
184
|
-
Idempotent — deleting a non-existent
|
|
183
|
+
Idempotent — deleting a non-existent topic succeeds silently.
|
|
185
184
|
|
|
186
185
|
Args:
|
|
187
|
-
topic:
|
|
188
|
-
subscription: Subscription/consumer group name
|
|
186
|
+
topic: Topic identifier in class:topicspace:topic format
|
|
189
187
|
"""
|
|
190
188
|
...
|
|
191
189
|
|
|
192
|
-
async def
|
|
190
|
+
async def topic_exists(self, topic: str) -> bool:
|
|
193
191
|
"""
|
|
194
|
-
Check whether a
|
|
192
|
+
Check whether a topic exists.
|
|
195
193
|
|
|
196
194
|
Args:
|
|
197
|
-
topic:
|
|
198
|
-
subscription: Subscription/consumer group name
|
|
195
|
+
topic: Topic identifier in class:topicspace:topic format
|
|
199
196
|
|
|
200
197
|
Returns:
|
|
201
|
-
True if the
|
|
198
|
+
True if the topic exists, False otherwise.
|
|
202
199
|
"""
|
|
203
200
|
...
|
|
204
201
|
|
|
205
|
-
async def
|
|
202
|
+
async def ensure_topic(self, topic: str) -> None:
|
|
206
203
|
"""
|
|
207
|
-
Ensure a
|
|
204
|
+
Ensure a topic exists, creating it if necessary.
|
|
208
205
|
|
|
209
206
|
Convenience wrapper — checks existence, creates if missing.
|
|
210
|
-
Used by system services on startup.
|
|
207
|
+
Used by the flow service and system services on startup.
|
|
211
208
|
|
|
212
209
|
Args:
|
|
213
|
-
topic:
|
|
214
|
-
subscription: Subscription/consumer group name
|
|
210
|
+
topic: Topic identifier in class:topicspace:topic format
|
|
215
211
|
"""
|
|
216
212
|
...
|
|
217
213
|
|
|
@@ -266,22 +266,22 @@ class PulsarBackend:
|
|
|
266
266
|
|
|
267
267
|
return PulsarBackendConsumer(pulsar_consumer, schema)
|
|
268
268
|
|
|
269
|
-
async def
|
|
269
|
+
async def create_topic(self, topic: str) -> None:
|
|
270
270
|
"""No-op — Pulsar auto-creates topics on first use.
|
|
271
271
|
TODO: Use admin REST API for explicit persistent topic creation."""
|
|
272
272
|
pass
|
|
273
273
|
|
|
274
|
-
async def
|
|
274
|
+
async def delete_topic(self, topic: str) -> None:
|
|
275
275
|
"""No-op — to be replaced with admin REST API calls.
|
|
276
|
-
TODO: Delete
|
|
276
|
+
TODO: Delete persistent topic via admin API."""
|
|
277
277
|
pass
|
|
278
278
|
|
|
279
|
-
async def
|
|
279
|
+
async def topic_exists(self, topic: str) -> bool:
|
|
280
280
|
"""Returns True — Pulsar auto-creates on subscribe.
|
|
281
281
|
TODO: Use admin REST API for actual existence check."""
|
|
282
282
|
return True
|
|
283
283
|
|
|
284
|
-
async def
|
|
284
|
+
async def ensure_topic(self, topic: str) -> None:
|
|
285
285
|
"""No-op — Pulsar auto-creates topics on first use.
|
|
286
286
|
TODO: Use admin REST API for explicit creation."""
|
|
287
287
|
pass
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"""
|
|
2
2
|
RabbitMQ backend implementation for pub/sub abstraction.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
subscription name:
|
|
4
|
+
Each logical topic maps to its own fanout exchange. The exchange name
|
|
5
|
+
encodes the full topic identity:
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
- Different subscriptions = separate queues (broadcast / fan-out)
|
|
7
|
+
class:topicspace:topic → exchange topicspace.class.topic
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Producers publish to the exchange with an empty routing key.
|
|
10
|
+
Consumers declare and bind their own queues:
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
- flow / request: named durable/non-durable queue (competing consumers)
|
|
13
|
+
- response / notify: anonymous exclusive auto-delete queue (per-subscriber)
|
|
14
|
+
|
|
15
|
+
The flow service manages topic lifecycle (create/delete exchanges).
|
|
16
|
+
Consumers manage their own queue lifecycle (declare + bind on connect).
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Architecture:
|
|
19
|
+
Producer --> [fanout exchange] --> [named queue] --> Consumer
|
|
20
|
+
--> [named queue] --> Consumer
|
|
21
|
+
--> [exclusive queue] --> Subscriber
|
|
20
22
|
"""
|
|
21
23
|
|
|
22
24
|
import asyncio
|
|
@@ -58,18 +60,16 @@ class RabbitMQMessage:
|
|
|
58
60
|
|
|
59
61
|
|
|
60
62
|
class RabbitMQBackendProducer:
|
|
61
|
-
"""Publishes messages to a
|
|
63
|
+
"""Publishes messages to a fanout exchange.
|
|
62
64
|
|
|
63
65
|
Uses thread-local connections so each thread gets its own
|
|
64
66
|
connection/channel. This avoids wire corruption from concurrent
|
|
65
67
|
threads writing to the same socket (pika is not thread-safe).
|
|
66
68
|
"""
|
|
67
69
|
|
|
68
|
-
def __init__(self, connection_params, exchange_name,
|
|
69
|
-
durable):
|
|
70
|
+
def __init__(self, connection_params, exchange_name, durable):
|
|
70
71
|
self._connection_params = connection_params
|
|
71
72
|
self._exchange_name = exchange_name
|
|
72
|
-
self._routing_key = routing_key
|
|
73
73
|
self._durable = durable
|
|
74
74
|
self._local = threading.local()
|
|
75
75
|
|
|
@@ -90,7 +90,7 @@ class RabbitMQBackendProducer:
|
|
|
90
90
|
chan = conn.channel()
|
|
91
91
|
chan.exchange_declare(
|
|
92
92
|
exchange=self._exchange_name,
|
|
93
|
-
exchange_type='
|
|
93
|
+
exchange_type='fanout',
|
|
94
94
|
durable=True,
|
|
95
95
|
)
|
|
96
96
|
self._local.connection = conn
|
|
@@ -113,7 +113,7 @@ class RabbitMQBackendProducer:
|
|
|
113
113
|
channel = self._get_channel()
|
|
114
114
|
channel.basic_publish(
|
|
115
115
|
exchange=self._exchange_name,
|
|
116
|
-
routing_key=
|
|
116
|
+
routing_key='',
|
|
117
117
|
body=json_data.encode('utf-8'),
|
|
118
118
|
properties=amqp_properties,
|
|
119
119
|
)
|
|
@@ -144,19 +144,17 @@ class RabbitMQBackendProducer:
|
|
|
144
144
|
|
|
145
145
|
|
|
146
146
|
class RabbitMQBackendConsumer:
|
|
147
|
-
"""Consumes from a queue bound to a
|
|
147
|
+
"""Consumes from a queue bound to a fanout exchange.
|
|
148
148
|
|
|
149
149
|
Uses basic_consume (push model) with messages delivered to an
|
|
150
150
|
internal thread-safe queue. process_data_events() drives both
|
|
151
151
|
message delivery and heartbeat processing.
|
|
152
152
|
"""
|
|
153
153
|
|
|
154
|
-
def __init__(self, connection_params, exchange_name,
|
|
155
|
-
|
|
156
|
-
auto_delete=False):
|
|
154
|
+
def __init__(self, connection_params, exchange_name, queue_name,
|
|
155
|
+
schema_cls, durable, exclusive=False, auto_delete=False):
|
|
157
156
|
self._connection_params = connection_params
|
|
158
157
|
self._exchange_name = exchange_name
|
|
159
|
-
self._routing_key = routing_key
|
|
160
158
|
self._queue_name = queue_name
|
|
161
159
|
self._schema_cls = schema_cls
|
|
162
160
|
self._durable = durable
|
|
@@ -171,17 +169,16 @@ class RabbitMQBackendConsumer:
|
|
|
171
169
|
self._connection = pika.BlockingConnection(self._connection_params)
|
|
172
170
|
self._channel = self._connection.channel()
|
|
173
171
|
|
|
174
|
-
# Declare the
|
|
172
|
+
# Declare the fanout exchange (idempotent)
|
|
175
173
|
self._channel.exchange_declare(
|
|
176
174
|
exchange=self._exchange_name,
|
|
177
|
-
exchange_type='
|
|
175
|
+
exchange_type='fanout',
|
|
178
176
|
durable=True,
|
|
179
177
|
)
|
|
180
178
|
|
|
181
179
|
if self._exclusive:
|
|
182
180
|
# Anonymous ephemeral queue (response/notify class).
|
|
183
|
-
#
|
|
184
|
-
# broker assigns the name.
|
|
181
|
+
# Per-consumer, broker assigns the name.
|
|
185
182
|
result = self._channel.queue_declare(
|
|
186
183
|
queue='',
|
|
187
184
|
durable=False,
|
|
@@ -189,20 +186,22 @@ class RabbitMQBackendConsumer:
|
|
|
189
186
|
auto_delete=True,
|
|
190
187
|
)
|
|
191
188
|
self._queue_name = result.method.queue
|
|
192
|
-
|
|
193
|
-
self._channel.queue_bind(
|
|
194
|
-
queue=self._queue_name,
|
|
195
|
-
exchange=self._exchange_name,
|
|
196
|
-
routing_key=self._routing_key,
|
|
197
|
-
)
|
|
198
189
|
else:
|
|
199
|
-
# Named queue (flow/request class).
|
|
200
|
-
#
|
|
201
|
-
# We just verify it exists and bind to consume.
|
|
190
|
+
# Named queue (flow/request class).
|
|
191
|
+
# Consumer owns its queue — declare and bind here.
|
|
202
192
|
self._channel.queue_declare(
|
|
203
|
-
queue=self._queue_name,
|
|
193
|
+
queue=self._queue_name,
|
|
194
|
+
durable=self._durable,
|
|
195
|
+
exclusive=False,
|
|
196
|
+
auto_delete=False,
|
|
204
197
|
)
|
|
205
198
|
|
|
199
|
+
# Bind queue to the fanout exchange
|
|
200
|
+
self._channel.queue_bind(
|
|
201
|
+
queue=self._queue_name,
|
|
202
|
+
exchange=self._exchange_name,
|
|
203
|
+
)
|
|
204
|
+
|
|
206
205
|
self._channel.basic_qos(prefetch_count=1)
|
|
207
206
|
|
|
208
207
|
# Register push-based consumer
|
|
@@ -318,7 +317,7 @@ class RabbitMQBackendConsumer:
|
|
|
318
317
|
|
|
319
318
|
|
|
320
319
|
class RabbitMQBackend:
|
|
321
|
-
"""RabbitMQ pub/sub backend using
|
|
320
|
+
"""RabbitMQ pub/sub backend using one fanout exchange per topic."""
|
|
322
321
|
|
|
323
322
|
def __init__(self, host='localhost', port=5672, username='guest',
|
|
324
323
|
password='guest', vhost='/'):
|
|
@@ -331,20 +330,23 @@ class RabbitMQBackend:
|
|
|
331
330
|
)
|
|
332
331
|
logger.info(f"RabbitMQ backend: {host}:{port} vhost={vhost}")
|
|
333
332
|
|
|
334
|
-
def
|
|
333
|
+
def _parse_topic(self, topic_id: str) -> tuple[str, str, bool]:
|
|
335
334
|
"""
|
|
336
|
-
Parse
|
|
335
|
+
Parse topic identifier into exchange name and durability.
|
|
337
336
|
|
|
338
337
|
Format: class:topicspace:topic
|
|
339
|
-
Returns: (exchange_name,
|
|
338
|
+
Returns: (exchange_name, class, durable)
|
|
339
|
+
|
|
340
|
+
The exchange name encodes the full topic identity:
|
|
341
|
+
class:topicspace:topic → topicspace.class.topic
|
|
340
342
|
"""
|
|
341
|
-
if ':' not in
|
|
342
|
-
return 'tg',
|
|
343
|
+
if ':' not in topic_id:
|
|
344
|
+
return f'tg.flow.{topic_id}', 'flow', True
|
|
343
345
|
|
|
344
|
-
parts =
|
|
346
|
+
parts = topic_id.split(':', 2)
|
|
345
347
|
if len(parts) != 3:
|
|
346
348
|
raise ValueError(
|
|
347
|
-
f"Invalid
|
|
349
|
+
f"Invalid topic format: {topic_id}, "
|
|
348
350
|
f"expected class:topicspace:topic"
|
|
349
351
|
)
|
|
350
352
|
|
|
@@ -356,36 +358,28 @@ class RabbitMQBackend:
|
|
|
356
358
|
durable = False
|
|
357
359
|
else:
|
|
358
360
|
raise ValueError(
|
|
359
|
-
f"Invalid
|
|
361
|
+
f"Invalid topic class: {cls}, "
|
|
360
362
|
f"expected flow, request, response, or notify"
|
|
361
363
|
)
|
|
362
364
|
|
|
363
|
-
|
|
364
|
-
exchange_name = topicspace
|
|
365
|
-
routing_key = f"{cls}.{topic}"
|
|
366
|
-
|
|
367
|
-
return exchange_name, routing_key, cls, durable
|
|
365
|
+
exchange_name = f"{topicspace}.{cls}.{topic}"
|
|
368
366
|
|
|
369
|
-
|
|
370
|
-
def map_queue_name(self, queue_id: str) -> tuple[str, bool]:
|
|
371
|
-
exchange, routing_key, cls, durable = self._parse_queue_id(queue_id)
|
|
372
|
-
return f"{exchange}.{routing_key}", durable
|
|
367
|
+
return exchange_name, cls, durable
|
|
373
368
|
|
|
374
369
|
def create_producer(self, topic: str, schema: type,
|
|
375
370
|
**options) -> BackendProducer:
|
|
376
|
-
exchange,
|
|
371
|
+
exchange, cls, durable = self._parse_topic(topic)
|
|
377
372
|
logger.debug(
|
|
378
|
-
f"Creating producer: exchange={exchange}
|
|
379
|
-
f"routing_key={routing_key}"
|
|
373
|
+
f"Creating producer: exchange={exchange}"
|
|
380
374
|
)
|
|
381
375
|
return RabbitMQBackendProducer(
|
|
382
|
-
self._connection_params, exchange,
|
|
376
|
+
self._connection_params, exchange, durable,
|
|
383
377
|
)
|
|
384
378
|
|
|
385
379
|
def create_consumer(self, topic: str, subscription: str, schema: type,
|
|
386
380
|
initial_position: str = 'latest',
|
|
387
381
|
**options) -> BackendConsumer:
|
|
388
|
-
"""Create a consumer with a queue bound to the topic exchange.
|
|
382
|
+
"""Create a consumer with a queue bound to the topic's exchange.
|
|
389
383
|
|
|
390
384
|
Behaviour is determined by the topic's class prefix:
|
|
391
385
|
- flow: named durable queue, competing consumers (round-robin)
|
|
@@ -393,7 +387,7 @@ class RabbitMQBackend:
|
|
|
393
387
|
- response: anonymous ephemeral queue, per-subscriber (auto-delete)
|
|
394
388
|
- notify: anonymous ephemeral queue, per-subscriber (auto-delete)
|
|
395
389
|
"""
|
|
396
|
-
exchange,
|
|
390
|
+
exchange, cls, durable = self._parse_topic(topic)
|
|
397
391
|
|
|
398
392
|
if cls in ('response', 'notify'):
|
|
399
393
|
# Per-subscriber: anonymous queue, auto-deleted on disconnect
|
|
@@ -403,45 +397,33 @@ class RabbitMQBackend:
|
|
|
403
397
|
auto_delete = True
|
|
404
398
|
else:
|
|
405
399
|
# Shared: named queue, competing consumers
|
|
406
|
-
queue_name = f"{exchange}.{
|
|
400
|
+
queue_name = f"{exchange}.{subscription}"
|
|
407
401
|
queue_durable = durable
|
|
408
402
|
exclusive = False
|
|
409
403
|
auto_delete = False
|
|
410
404
|
|
|
411
405
|
logger.debug(
|
|
412
406
|
f"Creating consumer: exchange={exchange}, "
|
|
413
|
-
f"
|
|
414
|
-
f"cls={cls}"
|
|
407
|
+
f"queue={queue_name or '(anonymous)'}, cls={cls}"
|
|
415
408
|
)
|
|
416
409
|
|
|
417
410
|
return RabbitMQBackendConsumer(
|
|
418
|
-
self._connection_params, exchange,
|
|
411
|
+
self._connection_params, exchange,
|
|
419
412
|
queue_name, schema, queue_durable, exclusive, auto_delete,
|
|
420
413
|
)
|
|
421
414
|
|
|
422
|
-
def
|
|
423
|
-
"""Blocking
|
|
415
|
+
def _create_topic_sync(self, exchange_name):
|
|
416
|
+
"""Blocking exchange creation — run via asyncio.to_thread."""
|
|
424
417
|
connection = None
|
|
425
418
|
try:
|
|
426
419
|
connection = pika.BlockingConnection(self._connection_params)
|
|
427
420
|
channel = connection.channel()
|
|
428
421
|
channel.exchange_declare(
|
|
429
|
-
exchange=
|
|
430
|
-
exchange_type='
|
|
422
|
+
exchange=exchange_name,
|
|
423
|
+
exchange_type='fanout',
|
|
431
424
|
durable=True,
|
|
432
425
|
)
|
|
433
|
-
|
|
434
|
-
queue=queue_name,
|
|
435
|
-
durable=durable,
|
|
436
|
-
exclusive=False,
|
|
437
|
-
auto_delete=False,
|
|
438
|
-
)
|
|
439
|
-
channel.queue_bind(
|
|
440
|
-
queue=queue_name,
|
|
441
|
-
exchange=exchange,
|
|
442
|
-
routing_key=routing_key,
|
|
443
|
-
)
|
|
444
|
-
logger.info(f"Created queue: {queue_name}")
|
|
426
|
+
logger.info(f"Created topic (exchange): {exchange_name}")
|
|
445
427
|
finally:
|
|
446
428
|
if connection and connection.is_open:
|
|
447
429
|
try:
|
|
@@ -449,34 +431,30 @@ class RabbitMQBackend:
|
|
|
449
431
|
except Exception:
|
|
450
432
|
pass
|
|
451
433
|
|
|
452
|
-
async def
|
|
453
|
-
"""
|
|
434
|
+
async def create_topic(self, topic: str) -> None:
|
|
435
|
+
"""Create the fanout exchange for a logical topic.
|
|
454
436
|
|
|
455
|
-
Only applies to
|
|
456
|
-
notify
|
|
437
|
+
Only applies to flow and request class topics. Response and
|
|
438
|
+
notify exchanges are created on demand by consumers.
|
|
457
439
|
"""
|
|
458
|
-
exchange,
|
|
440
|
+
exchange, cls, durable = self._parse_topic(topic)
|
|
459
441
|
|
|
460
442
|
if cls in ('response', 'notify'):
|
|
461
443
|
return
|
|
462
444
|
|
|
463
|
-
|
|
464
|
-
await asyncio.to_thread(
|
|
465
|
-
self._create_queue_sync, exchange, routing_key,
|
|
466
|
-
queue_name, durable,
|
|
467
|
-
)
|
|
445
|
+
await asyncio.to_thread(self._create_topic_sync, exchange)
|
|
468
446
|
|
|
469
|
-
def
|
|
470
|
-
"""Blocking
|
|
447
|
+
def _delete_topic_sync(self, exchange_name):
|
|
448
|
+
"""Blocking exchange deletion — run via asyncio.to_thread."""
|
|
471
449
|
connection = None
|
|
472
450
|
try:
|
|
473
451
|
connection = pika.BlockingConnection(self._connection_params)
|
|
474
452
|
channel = connection.channel()
|
|
475
|
-
channel.
|
|
476
|
-
logger.info(f"Deleted
|
|
453
|
+
channel.exchange_delete(exchange=exchange_name)
|
|
454
|
+
logger.info(f"Deleted topic (exchange): {exchange_name}")
|
|
477
455
|
except Exception as e:
|
|
478
|
-
# Idempotent —
|
|
479
|
-
logger.debug(f"
|
|
456
|
+
# Idempotent — exchange may already be gone
|
|
457
|
+
logger.debug(f"Exchange delete for {exchange_name}: {e}")
|
|
480
458
|
finally:
|
|
481
459
|
if connection and connection.is_open:
|
|
482
460
|
try:
|
|
@@ -484,31 +462,27 @@ class RabbitMQBackend:
|
|
|
484
462
|
except Exception:
|
|
485
463
|
pass
|
|
486
464
|
|
|
487
|
-
async def
|
|
488
|
-
"""Delete a
|
|
465
|
+
async def delete_topic(self, topic: str) -> None:
|
|
466
|
+
"""Delete a topic's fanout exchange.
|
|
489
467
|
|
|
490
|
-
|
|
491
|
-
notify queues are anonymous/auto-delete and managed by the broker.
|
|
468
|
+
Consumer queues lose their binding and drain naturally.
|
|
492
469
|
"""
|
|
493
|
-
exchange,
|
|
470
|
+
exchange, cls, durable = self._parse_topic(topic)
|
|
471
|
+
await asyncio.to_thread(self._delete_topic_sync, exchange)
|
|
494
472
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
queue_name = f"{exchange}.{routing_key}.{subscription}"
|
|
499
|
-
await asyncio.to_thread(self._delete_queue_sync, queue_name)
|
|
500
|
-
|
|
501
|
-
def _queue_exists_sync(self, queue_name):
|
|
502
|
-
"""Blocking queue existence check — run via asyncio.to_thread.
|
|
473
|
+
def _topic_exists_sync(self, exchange_name):
|
|
474
|
+
"""Blocking exchange existence check — run via asyncio.to_thread.
|
|
503
475
|
Uses passive=True which checks without creating."""
|
|
504
476
|
connection = None
|
|
505
477
|
try:
|
|
506
478
|
connection = pika.BlockingConnection(self._connection_params)
|
|
507
479
|
channel = connection.channel()
|
|
508
|
-
channel.
|
|
480
|
+
channel.exchange_declare(
|
|
481
|
+
exchange=exchange_name, passive=True,
|
|
482
|
+
)
|
|
509
483
|
return True
|
|
510
484
|
except pika.exceptions.ChannelClosedByBroker:
|
|
511
|
-
# 404 NOT_FOUND —
|
|
485
|
+
# 404 NOT_FOUND — exchange does not exist
|
|
512
486
|
return False
|
|
513
487
|
finally:
|
|
514
488
|
if connection and connection.is_open:
|
|
@@ -517,26 +491,25 @@ class RabbitMQBackend:
|
|
|
517
491
|
except Exception:
|
|
518
492
|
pass
|
|
519
493
|
|
|
520
|
-
async def
|
|
521
|
-
"""Check whether a
|
|
494
|
+
async def topic_exists(self, topic: str) -> bool:
|
|
495
|
+
"""Check whether a topic's exchange exists.
|
|
522
496
|
|
|
523
|
-
Only applies to
|
|
524
|
-
notify
|
|
497
|
+
Only applies to flow and request class topics. Response and
|
|
498
|
+
notify topics are ephemeral — always returns False.
|
|
525
499
|
"""
|
|
526
|
-
exchange,
|
|
500
|
+
exchange, cls, durable = self._parse_topic(topic)
|
|
527
501
|
|
|
528
502
|
if cls in ('response', 'notify'):
|
|
529
503
|
return False
|
|
530
504
|
|
|
531
|
-
queue_name = f"{exchange}.{routing_key}.{subscription}"
|
|
532
505
|
return await asyncio.to_thread(
|
|
533
|
-
self.
|
|
506
|
+
self._topic_exists_sync, exchange
|
|
534
507
|
)
|
|
535
508
|
|
|
536
|
-
async def
|
|
537
|
-
"""Ensure a
|
|
538
|
-
if not await self.
|
|
539
|
-
await self.
|
|
509
|
+
async def ensure_topic(self, topic: str) -> None:
|
|
510
|
+
"""Ensure a topic exists, creating it if necessary."""
|
|
511
|
+
if not await self.topic_exists(topic):
|
|
512
|
+
await self.create_topic(topic)
|
|
540
513
|
|
|
541
514
|
def close(self) -> None:
|
|
542
515
|
pass
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.3.14"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.14
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.3.13"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/collection_config_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.3.13 → trustgraph_base-2.3.14}/trustgraph/base/document_embeddings_client.py
RENAMED
|
File without changes
|