Code Monkey home page Code Monkey logo

Comments (4)

bzrncev avatar bzrncev commented on June 24, 2024 3

Hi,

There is no function 'connection', but you can use the third parameter in publish or consume.

\Amqp::consume('some-queue', function ($message, $resolver) { }, config('amqp')['properties']['YOUR_CONNECTION'])

from laravel-amqp.

weblogics avatar weblogics commented on June 24, 2024 2

@bzrncev We are trying to use this approach for publish, but we're running into issues where the message is sent to both the default queue configured in settings as well as the requested queue sent along with the publish method.

This doesn't work

Amqp::publish('', $data, ['queue' => $queueName]);

This publishes to the default Queue in settings as well as the inserted $queueName

This kinda work's

Amqp::publish('EmailNotification', $data, ['queue' => $queueName]);

This causes knock-on effects with other services having to then be restarted in a particular way, any ideas why this occurs as we just want to use one connection, have a default Queue, but be able to independently publish to a separate Queue without populating to the default Queue within the settings file.

from laravel-amqp.

stevenklar avatar stevenklar commented on June 24, 2024

Right now this library support to define multiple connections but you can only use one. (use in config)

@bzrncev interesting workarround :)
I will not close this issue in favor for discussion on if and how this could be implemented.
Thank you for this suggestion.

from laravel-amqp.

michail1982 avatar michail1982 commented on June 24, 2024

Hi, multiple instances can be placed in dfferent hosts, so need to be separated in https://github.com/bschmitt/laravel-amqp/blob/master/src/Request.php#L33

For first publish make connect , and rewrite host/port does not applied for next calls

like a sollution i sugget make hash from connection params and store/get connection from connections array by it

from laravel-amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.