by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
NeilJ247
@NeilJ247
@steveb_gitlab thanks for the heads up
Paweł Niedzielski
@steveb_gitlab
but it should have better support for it if all you want is just read from it and route it somewhere else - especially if you're app is already Symfony based
NeilJ247
@NeilJ247
@steveb_gitlab the app is just using the components as that's all it needs at the moment
@steveb_gitlab I think the other possible way of doing this is to use a job queue with sub-jobs https://php-enqueue.github.io/job_queue/run_sub_job/
Paweł Niedzielski
@steveb_gitlab
What do you need to do? Read messages from AWS and then queue some tasks?
That other processes pick up @NeilJ247 ?
EventDispatcher is by design synchronous, i.e. the same process works on whatever you want it to do
NeilJ247
@NeilJ247
@steveb_gitlab sorry have a meeting atm will get back to you
Paweł Niedzielski
@steveb_gitlab
Symfony Messenger is similar in that it has a routing mechanism and can work both synchronously and asynchronously - putting workload to other processes to do later (in async there is no feedback - original process "dispatches" a message to transport and consuming process pick it up when it's not doing anything)
so it's similar to JobQueue, but has no concept of UniqueJobs or returned values (at least not yet)
Bartek Niewinski
@biforb4
Hi guys
any chance somebody could have a look at this php-enqueue/enqueue-dev#1020
I'd like to hear some feedback
@makasim maybe?
Paweł Niedzielski
@steveb_gitlab
@biforb4 Looks good, I'll only have one or two comments
nvm, looks good
I've restarted the failing test since it looked like a setup issue
Maksym Khartanovych
@mxkh
Hi guys, I have a question about how I can name my queues? In Symfony messenger, I can configure different queue names for transport, how I can do the same using enqueue?
wannian
@wannianma

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

- Can only install one of: queue-interop/queue-interop[0.8.0, 0.6.2].
- Can only install one of: queue-interop/queue-interop[0.8.0, 0.6.2].
- Can only install one of: queue-interop/queue-interop[0.8.0, 0.6.2].
- enqueue/fs 0.10.1 requires queue-interop/queue-interop ^0.8 -> satisfiable by queue-interop/queue-interop[0.8.0].
- Installation request for enqueue/fs ^0.10.1 -> satisfiable by enqueue/fs[0.10.1].
- Installation request for queue-interop/queue-interop (locked at 0.6.2) -> satisfiable by queue-interop/queue-interop[0.6.2].
Who knows what cause this? My laravel version is 5.5.
Paweł Niedzielski
@steveb_gitlab
@wannianma you need to update dependencies as well
You can see that queue-interop/queue-interop is locked on lower version
Vescatur
@Vescatur

Hello,
I am working on a Symfony application and wanted to use the async dispatcher. I have a symfony command that should dispatch multiple events. Then wait till they finish. However what happens now, is that the command dispatches the event but doesn’t wait till it is finished. Which has the effect that the eventListener doesn’t execute.
How do I wait until all async events are finished? Thanks in advance for helping.

class TestWebpageCommand extends Command
{
protected static $defaultName = 'test-webpage';

private $em;
/* @var OutputInterface /
private $output;

private $dispatcher;

public function construct(EventDispatcherInterface $dispatcher, EntityManagerInterface $em)
{
$this->em = $em;
$this->dispatcher = $dispatcher;
parent::
construct();
}

protected function initialize(InputInterface $input, OutputInterface $output)
{
$this->output = $output;
}

protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln("start");
$event = new onStartSpeedTest();
$this->dispatcher->dispatch($event);
$event = new onStartSpeedTest();
$this->dispatcher->dispatch($event);
$output->writeln("end");
}
}

kor3k
@kor3k

@Vescatur

How do I wait until all async events are finished?

you don't. that's quite the point of async events - you don't wait for them to get finished. if you need the result of some async procedure, then you need to either use RPC as @makasim suggests, or if you need to stick with events, return the result via another queue/event.

Vescatur
@Vescatur
Thank you @makasim and @kor3k for the fast responses. I don’t need the result of the event. (The eventListener is responsible for saving the result in the database) You are saying that I shouldn’t wait for async events to finish. That seems logical.
The problem that I am having is that the events have been dispatch but the eventListeners never execute anything. I never see a result in the database. How can I ensure that the eventListeners can react to the event when using a async dispatcher?
To ensure I didn't have a bug I tested my code with a synchronous dispatcher. Then I get the results in the database.
Paweł Niedzielski
@steveb_gitlab
@Vescatur asynchronous events should be handled by a separate process in the background, that you yourself start up and keep alive (by using tools like supervisord for example)
otherwise what happens is that tasks are scheduled for execution, but since nothing picks them up, they are never done
I'm almost sure enqueue have a console command for this process but I can't remember how it's called from the top of my head
Vescatur
@Vescatur
Thank you. I will look into it.
Igor Snezhko
@snezhkoigor
Hi. I Have ActiveMQ with STOMP. Can I do $rpcClient->callAsync and $promise->receiveNoWait() ?
fifgo
@fifgo
Hello everybody! Does anyone of you have interest in a startup from Germany? We are looking for a CTO / a good backend developer!
fifgo
@fifgo
Very good knowledge of PHP (Symfony) is desired.
maxmadknight
@maxmadknight

Hi there, I am using Symfony 3.4 and Enqueue (0.9.15) over Dbal, I can produce a message, I have see them in DB but I am cannot process it,
All that I have to see in console is
./c enqueue:consume --setup-broker -vvv
18:58:55 DEBUG [app] [DbalDriver] Creating database table: "enqueue"
and it all, no any other output.

$messageTopic = $this->context->createTopic('notification_processor');
$message = new DbalMessage(
            $body,
            $properties,
            $headers
);
$this->context->createProducer()->send($messageTopic, $message);

and processor

class NotificationProcessor implements Processor, TopicSubscriberInterface
{
...


    public static function getSubscribedTopics()
    {
        return ['notification_processor'];
    }
}

I have see this processor in enqueue:routes result

What I am doing wrong?

Iv Po
@dotdevru
Hello guys, i am looking for possibility to do this: i have 2 apps, both just plane symfony4 + enqueue-bundle + enqueue/amqp-ext, first is used to consume messages, second will send commands to first app, like microservices, so i need reply in second app from first one, but enqueue-bundle in second app doesnt know about routes for processors registered in first app, how i can deal with it in context of enqueue-bundle? i always get There is no route for command on second app. And its true because its registered in first app. How i can deal with it? )
Maxim Mazurok
@Maxim-Mazurok

Hello guys, i am looking for possibility to do this: i have 2 apps, both just plane symfony4 + enqueue-bundle + enqueue/amqp-ext, first is used to consume messages, second will send commands to first app, like microservices, so i need reply in second app from first one, but enqueue-bundle in second app doesnt know about routes for processors registered in first app, how i can deal with it in context of enqueue-bundle? i always get There is no route for command on second app. And its true because its registered in first app. How i can deal with it? )

I had similar issue, I ended up setting up dummy routes for the second app, kind of like interfaces with no actual code, so that it just knows that they exist. Kind of dirty, but it worked fine. Not sure if there's any better way of doing this.

Gaurav Malhotra
@levelfivehub
Hi all, i am experimenting enqueue, with Symfony, SQS and EB Worker. It seems every time a message gets added, SQS posts to a path on the Worker. Has anyone else experienced this? I am not sure what documentation i need to follow for this
mostafaahamidmanon
@mostafaahamidmanon
Hello Guys,
How can I set kafka dsn string?
in symfony .env file?
ENQUEUE_DSN=amqp+bunny://kafka:9092/%2f
?
Your help is much appreciated
mostafaahamidmanon
@mostafaahamidmanon
Thanks Guys (Solved)
:)
Tobias Sette
@gnumoksha_gitlab
Hello. Is there a way to use monitoring with prometheus and grafana?
Florian Krämer
@burzum

Hello, I'm trying to implement a job queue, the docs say "Here’s some examples. It shows how you can run unique job using job queue (The configuration is described in a dedicated chapter)."

But where is the configuration for the job queue explained?

vltel
@vltel
Hello.
I have working consumer of fixed named queue "queue.1".
But the queue names have a mask "queue.*".
I cant to set up a consumer from several masked queues.
Please help me how configure a consumer from several masked queues.
Jose Cañizales
@joshca1
Hello i have a no framework php aplication and I want to delay emails when user submits a form, this library works for this?