Skip to main content
Fusioncat is currently in its alpha stage. The main API server is located at: https://api.staging.fusioncatalyst.io/Please note that breaking changes and bugs are to be expected, as the product is still under active development.

Message Management Commands

The paw messages commands allow you to create and manage messages that are based on your schema definitions.

Commands

messages list

List all messages in a project.

Options

  • --project-id (required): The ID of the project

Examples

messages new

Create a new message based on a schema.

Options

  • --project-id (required): The ID of the project
  • --name (required): Name of the message
  • --schema-id (required): The ID of the schema this message is based on
  • --schema-version (required): The version of the schema to use
  • --description: Description of the message

Examples

Understanding Messages

What is a Message?

A message is a concrete implementation of a schema used for:
  • Event definitions in event-driven architectures
  • API request/response definitions
  • Data transfer objects (DTOs)
  • Queue message formats

Message vs Schema

  • Schema: The abstract data structure definition
  • Message: A specific use case of that schema
Example:
  • Schema: User (defines user data structure)
  • Messages: UserCreatedEvent, UserUpdatedEvent, UserProfileResponse

Message Versioning

Messages are tied to specific schema versions:
  • When a schema updates, existing messages continue using their version
  • Create new messages for new schema versions
  • Allows gradual migration

Event-Driven Architecture

Messages are particularly useful for event-driven systems:

Best Practices

Naming Conventions

  1. Events: Use past tense - UserCreated, OrderShipped
  2. Commands: Use imperative - CreateUser, ShipOrder
  3. Requests/Responses: Be descriptive - GetUserRequest, UserProfileResponse

Message Organization

Group related messages:

Schema Reuse

Multiple messages can use the same schema:

Examples

API Message Definitions

Event Sourcing

Microservices Communication

Working with Servers and Resources

Messages are often used with servers and resources: