Skip to main content

Crate zerodds_amqp_endpoint

Crate zerodds_amqp_endpoint 

Source
Expand description

Crate zerodds-amqp-endpoint. Safety classification: STANDARD.

DDS-AMQP 1.0 bidirectional endpoint stack — pure-Rust no_std + alloc (with an optional std loader layer), forbid(unsafe_code). Implements the protocol layers above the wire codec (zerodds-amqp-bridge):

Spec: OMG DDS-AMQP-1.0 (formal/2024-08-01) §2.1 (endpoint profile), §6.1 (direct-embed topology), §7 (mapping), §11 (errors), Annex A (configuration schema). OASIS AMQP-1.0 §2.4 (connection state), §2.5 (session state), §2.6 (link lifecycle).

§Layer position

Layer 5 — bridges. Sits on zerodds-amqp-bridge (wire codec). The TCP/TLS listener itself lives in the daemon crate tools/amqp-dds-endpoint/; this crate provides the wire-independent protocol layers.

§Public API (as of 1.0.0-rc.1)

  • sasl — SASL frame layer (PLAIN / ANONYMOUS / EXTERNAL) per spec §10.2.
  • session — connection/session state machine + idle timeout + DoS caps per spec §6.1.
  • link — sender/receiver link acceptance + settlement tracking + disposition-mapper wireup (§7.4 + §7.7.3).
  • routing — address resolution + wildcard mapping per spec §7.3.
  • mapping — body-encoding-mode mapping (pass-through / JSON / AMQP-native) per spec §8.1.
  • properties — application-properties codec with dds:operation / dds:instance-handle / dds:type-id.
  • dds_bridge — trait surfaces (DdsOperationDispatcher + DispositionMapper) for caller DCPS bridges.
  • management — catalog + audit producers + metrics snapshots.
  • metrics — mandatory metric hub.
  • security — access-control plugin surface + governance.
  • coexistence — multi-bridge hop cap + inbound decision.
  • rpc_correlation — outstanding calls + reply routing.
  • errors — §11 spec error conditions as typed errors.
  • limitsResourceLimits data model from Annex A.
  • keyhash — SHA-256 group-id hashing for §7.6.1.
  • annex_a — IDL mirror of the Annex-A configuration schema.
  • codegen_helpers — helpers for the Annex-A IDL codegen.
  • config_xml (feature std) — XML configuration loader (§9.2).

§What is caller-layer

  • TCP listener operations and TLS termination — the daemon crate (tools/amqp-dds-endpoint/) with tokio + rustls.
  • Discovery wire — the DDS-SPDP/SEDP bridge to the DDS side lives in crates/discovery/.
  • Live-interop smoke against pika/qpid-proton/Azure-SB — the test harness in the daemon crate.

Re-exports§

pub use coexistence::BridgeId;
pub use coexistence::CoexistenceConfig;
pub use coexistence::DEFAULT_HOP_CAP;
pub use coexistence::InboundDecision;
pub use coexistence::MAX_HOP_CAP;
pub use coexistence::inspect_inbound;
pub use coexistence::stamp_outbound;
pub use dds_bridge::AcceptAllDispatcher;
pub use dds_bridge::DdsOperationDispatcher;
pub use dds_bridge::DispatchOutcome;
pub use dds_bridge::DispositionMapper;
pub use dds_bridge::DispositionState;
pub use dds_bridge::InboundOperation;
pub use dds_bridge::InstanceTrackingDispatcher;
pub use dds_bridge::NoopDispositionMapper;
pub use errors::AmqpError;
pub use errors::AmqpErrorCondition;
pub use errors::ErrorDescription;
pub use errors::ErrorScope;
pub use errors::access_denied;
pub use errors::instance_unknown;
pub use errors::map_mapping_error;
pub use errors::map_resolution_error;
pub use errors::register_missing_key;
pub use errors::resource_limit_exceeded;
pub use errors::unknown_dds_operation;
pub use errors::unsettled_state_not_implemented;
pub use limits::ResourceLimits;
pub use link::AttachDurabilityCheck;
pub use link::LinkRole;
pub use link::LinkSession;
pub use link::SettlementMode;
pub use link::TerminusDurability;
pub use link::check_attach_durability;
pub use management::AddressKind;
pub use management::AuditEvent;
pub use management::AuditProducer;
pub use management::CatalogDirection;
pub use management::CatalogEntry;
pub use management::CatalogProducer;
pub use management::CatalogTypeId;
pub use management::addresses;
pub use management::audit_event_sample;
pub use management::classify_address;
pub use management::metrics_snapshot;
pub use mapping::BodyEncodingMode;
pub use mapping::MappingError;
pub use mapping::encode_dds_to_amqp_body;
pub use mapping::parse_amqp_body;
pub use metrics::MANDATORY_METRIC_NAMES;
pub use metrics::MetricsHub;
pub use properties::DdsOperation;
pub use properties::ProducedProperties;
pub use properties::SampleHeader;
pub use properties::TypeIdCheck;
pub use properties::inspect_dds_type_id;
pub use properties::message_id;
pub use properties::produce_application_properties;
pub use properties::produce_properties;
pub use routing::AddressResolution;
pub use routing::AddressRouter;
pub use routing::ResolutionError;
pub use routing::effective_partitions;
pub use rpc_correlation::DEFAULT_MAX_OUTSTANDING_CALLS;
pub use rpc_correlation::DEFAULT_RPC_TIMEOUT_MS;
pub use rpc_correlation::IssueDecision;
pub use rpc_correlation::OutstandingCalls;
pub use rpc_correlation::ReplyDecision;
pub use rpc_correlation::ReplyProperties;
pub use rpc_correlation::RpcConfig;
pub use sasl::SaslCode;
pub use sasl::SaslMechanism;
pub use sasl::SaslOutcome;
pub use sasl::SaslState;
pub use security::AccessControlPlugin;
pub use security::AccessDecision;
pub use security::AccessOp;
pub use security::AllowAll;
pub use security::DataProtectionKind;
pub use security::DualIdentity;
pub use security::GovernanceDocument;
pub use security::GovernanceRule;
pub use security::IdentityToken;
pub use security::LinkGovernance;
pub use security::SaslSubject;
pub use security::StaticAllowList;
pub use security::build_identity_token;
pub use security::class_ids;
pub use session::ConnectionState;
pub use session::EndpointConfig;
pub use session::EndpointError;
pub use session::SessionState;
pub use session::advance_connection;

Modules§

annex_a
Annex-A IDL configuration schema (normative).
backoff
Exponential backoff for reconnect loops.
bridge_security
AMQP endpoint §7.x bridge-security wireup (separate from the DDS-Security mapper in crate::security).
client
Minimal AMQP 1.0 client connection (initiator role) — the piece a broker such as RabbitMQ requires: a SASL handshake before the AMQP connection, then open / begin / attach(target) / transfer / detach / close.
codegen_helpers
Codegen helpers for per-language PSM templates.
coexistence
Bridge-coexistence loop prevention.
config_xml
XML configuration loader for Annex-A structures.
daemon_runtime
Cross-cutting daemon runtime for the AMQP daemon.
dds_bridge
DDS bridge trait surface.
errors
AMQP error-code mapping + diagnostic-description format.
keyhash
group-id canonical-key producer.
limits
Resource limits + DoS caps for the DDS-AMQP endpoint.
link
Sender/receiver link acceptance + settlement tracking.
management
Management-surface producer.
mapping
Body-encoding-mode mapping (pass-through / JSON / AMQP-native).
metrics
Mandatory-metrics counter hub.
properties
Properties + application-properties producer.
qos_translation
§6 — DDS-QoS → AMQP-Behavior-Translation.
routing
Address resolution + wildcard routing.
rpc_correlation
RPC-aware correlation + reply validation.
sasl
SASL frame layer for the AMQP endpoint.
scram
SASL SCRAM-SHA-256 (RFC 7677 / RFC 5802) — Salted Challenge Response Authentication Mechanism.
security
DDS-Security bridge for the AMQP endpoint.
session
Connection/session state machine for the DDS-AMQP endpoint.