Download the PHP package letsgoi/laravel-domain-events-messaging without Composer

On this page you can find all versions of the php package letsgoi/laravel-domain-events-messaging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-domain-events-messaging

Laravel Domain Events Messaging

This package allows to send/consume domain message events from your laravel app. This can be used to communicate between services or in the same application via queues.

It's divided in two main elements:

Requirements

Instalation

Service Provider will be automatically registered, however if you want to add it manually, you must add this to your config/app.php file:

Usage

Publisher

Domain Events Messaging Publisher will publish messages to exchange defined on config file (on DOMAIN_EVENTS_PUBLISHER_CONNECTION env variable).

Publishing messages

Just use publish method on DomainEventsMessagingPublisher facade to send messages with event type:

Consumer

Domain Events Messaging Consumer will consume messages from the queue driver defined on config file (on DOMAIN_EVENTS_CONSUMER_CONNECTION env variable) and launch jobs/events setted on config file (config/domain_events_messaging.php) by message subject.

Defining events:

On config file you must set the messages to be consumed and the job/event to be dispatched when this message will be consumed:

When consumer read some message with subject defined on this config, the job/event will be launch with the array $payload setted on his constructor.

Jobs/Events

The class defined on config file to be dispatched on message, could be:

Both will be receive on his constructor message as string:

You can queue the jobs as a normal job on Laravel.

Running consumer:

To run the consumer as a daemon you must execute:

This task should be monitored with some like supervisor to be running on fails.

Drivers

AWS SNS-SQS

To use AWS SNS or AWS SQS driver, you must follow this instructions:

Testing

Run tests:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT


All versions of laravel-domain-events-messaging with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/console Version ^9.0|^10.0
illuminate/support Version ^9.0|^10.0
ext-json Version *
aws/aws-sdk-php Version ^3.134
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package letsgoi/laravel-domain-events-messaging contains the following files

Loading the files please wait ....