How pangbit/moonpulsar works
moonpulsar is a native MoonBit Apache Pulsar binary-protocol client. An application connects through Client, creates a producer and consumer, sends a message, receives it, then acknowledges it. The library also exposes readers, administration, transactions, schemas, authentication, encryption, partitioned topics, and compression. The graph captures these documented capabilities and the protocol/connection layers indicated by the source tree; most implementation excerpts were not sampled, so internal wiring beyond the documented workflow is omitted.
Main entry points: client.mbt Client · producer.mbt Producer · consumer.mbt Consumer · schema.mbt Schemas
Components 21
Client API
- Client
client.mbt - Client Options
client_options.mbt
Messaging
- Producer
producer.mbt - Consumer
consumer.mbt - Reader
reader.mbt - Message Model
message.mbt
Protocol Transport
- Connection Manager
connection_manager.mbt - Connection
connection.mbt - Frame Codec
frame.mbt - Protocol Bindings
proto/PulsarApi.proto - Topic Lookup
lookup.mbt
Extended Capabilities
- Administration
admin.mbt - Transactions
transaction.mbt - Schemas
schema.mbt - Schema Codecs
schema_codec.mbt - Athenz Auth
athenz_zts.mbt - Message Encryption
message_crypto.mbt - Compression
compression.mbt - Telemetry
telemetry.mbt
Other components
- Application
- Pulsar Broker
Connections 27
- Application → Client: connects
- Application → Client: configures
- Client → Client Options: uses
- Client → Producer: creates
- Client → Consumer: creates
- Client → Reader: creates
- Client → Administration: exposes
- Client → Pulsar Broker: connects
- Producer → Pulsar Broker: publishes
- Consumer → Pulsar Broker: receives and acknowledges
- Reader → Pulsar Broker: reads
- Connection Manager → Connection: manages
- Connection → Frame Codec: exchanges frames
- Frame Codec → Protocol Bindings: encodes commands
- Topic Lookup → Pulsar Broker: resolves topics
- Producer → Message Model: sends
- Consumer → Message Model: delivers
- Producer → Schemas: supports
- Consumer → Schemas: supports
- Schemas → Schema Codecs: encodes and decodes
- Producer → Compression: supports
- Consumer → Compression: supports
- Producer → Message Encryption: supports
- Consumer → Message Encryption: supports
- Client → Athenz Auth: supports
- Client → Transactions: exposes
- Client → Telemetry: supports