Laravel 5 Events and Queue -


as mentioned in laravel docs (http://laravel.com/docs/5.1/events#defining-listeners), can make listener queued. makes possible run events in asynchronous manner.

i went more deep this, , found out can have event fired in separate laravel installation, long use same queue instance(beanstalkd in case) , share same listener (the listener class should defined in both installations).

now need more information regarding this.

  1. is ok? mean, works now, considered "hack"? there library or way this?
  2. how can have distributed events using this? mean, when fire event somewhere, there listeners fired somewhere else. not on same installation, , of them has fired. not achievable current setup.

i think i'm looking distributed event system laravel, i'm not sure...

you don´t need queue achieve this. had similar problem , solve @ way:

  1. if want send events frontend on machine recommend use broadcasting events. can use redis or pusher.
  2. if want send events backend on machine need use redis sub/pub. send event place (publisher) , need in each machine listener event (subscribers).

i use beanstalkd distribute jobs in several instances. works charm!


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -