Resource Management Commands
Thepaw resources commands allow you to create and manage resources within servers, such as topics, queues, exchanges, and endpoints.
Commands
resources list
List all resources in a server.Options
--server-id(required): The ID of the server
Examples
resources new
Create a new resource.Options
--server-id(required): The ID of the server--name(required): Name of the resource--type(required): Type of the resourcetopic: Kafka topic or similarexchange: AMQP exchangequeue: Message queuetable: Data tableendpoint: HTTP endpoint
--mode(required): Access mode for the resourceread: Read-only accesswrite: Write-only accessreadwrite: Full read/write accessbind: Binding mode (for AMQP)
--description: Description of the resource
Examples
Resource Types by Server
Kafka Server Resources
Topics - Event streams:AMQP Server Resources
Exchanges - Message routing:Webhook Server Resources
Endpoints - HTTP callbacks:Access Modes
read
- Can consume/receive from the resource
- For queues: dequeue messages
- For topics: subscribe and consume
- For endpoints: receive webhooks
write
- Can produce/send to the resource
- For queues: enqueue messages
- For topics: publish events
- For endpoints: send webhooks
readwrite
- Full access to both read and write
- Most common for internal services
bind
- Special mode for AMQP
- Bind queues to exchanges
- Set up routing rules
Best Practices
Naming Conventions
-
Topics: Use dot notation -
domain.entity.action -
Queues: Use descriptive names with purpose
-
Endpoints: Include action and target
Resource Organization
Group related resources:Access Control
Principle of least privilege:Examples
Event-Driven Microservices
Task Queue System
Webhook Integration
Generated Code
Resources generate connection code:Related Commands
- Servers - Create servers to contain resources
- Messages - Define messages to send through resources
- Code Generation - Generate resource handling code