Closed igor875126 closed 5 years ago
Hi @igor875126
I know that. It is mentioned in the documentation. You need to wrap your payload because it passes to a listener with call_user_func_array
. Because of this, I've made new functionality with publish
helper and trait. Please try it.
I'll be glad to get feedback from you if it works or not.
Hi @igor875126 I know that. It is mentioned in the documentation. You need to wrap your payload because it passes to a listener with
call_user_func_array
. Because of this, I've made new functionality withpublish
helper and trait. Please try it.I'll be glad to get feedback from you if it works or not.
Hey,
thank you for your answer, unfortunately i cannot do this, because of microservice architecture and other libraries. I mean in the project where payload is beeing sent we are using another framework and another rabbit lib.
Please check my merge request, I am almost 100% sure that this will work with even not surrounded payloads.
@igor875126 is this PR still actual?
@igor875126 is this PR still actual?
No, it's not actual any more. You can close it. Unfortunately, we are forced to fork your repository and continue developing to our needs.
Hey, I've found a behavior that when you use not an wildcard listener the payload is given as string in the listener handle method, this string is the first element of payload array.
But if you wrap it in the additional array, then everything is working as expected, wildcard listeners tested too....
Example:
BroadcastEventServiceProvider
UserAuthenticatedListener
Payload in rabbitmq message
dd($payload)
With my fix - dd($payload)
BTW: I am using PHP 7.3.9 + Laravel ^6.0 nuwber/rabbitevents 2.0 - same behavoir nuwber/rabbitevents 3.0-beta1 - same behavoir