Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection option is not working #98

Open
zek opened this issue Sep 18, 2022 · 1 comment
Open

Connection option is not working #98

zek opened this issue Sep 18, 2022 · 1 comment
Assignees

Comments

@zek
Copy link

zek commented Sep 18, 2022

Defining connection option in the command line is not working. Always using default connection

php artisan rabbitevents:listen queue --connection="custom"

I suspect it is because of following line

https://github.com/nuwber/rabbitevents/blob/7.x/src/RabbitEvents/Foundation/RabbitEventsServiceProvider.php#L42

@zek zek mentioned this issue Sep 19, 2022
@masterjus masterjus added the bug label Sep 20, 2022
@masterjus masterjus self-assigned this Sep 20, 2022
@masterjus
Copy link
Contributor

masterjus commented Sep 20, 2022

It also requires to add an additional functionality for publishing.

SomeEvent::connection('custom')->publish([]);

and the helper function should receive parameters like

publish('event.name', $payload, $parameters = ['connection' => 'custom']);

The connection config couldn't be resolved in the boot method of the service provider as it does now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants