File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ public function run()
69
69
$ connection = $ this ->connectionManager ->getConnection ($ this ->options ['connection ' ]);
70
70
$ this ->queue = new AmqpLibQueue ($ this ->logger , $ connection , $ this ->options ['queue_name ' ]);
71
71
72
+ if ($ this ->options ['exchange ' ]) {
73
+ $ this ->queue ->setExchange ($ this ->options ['exchange ' ]['name ' ], $ this ->options ['exchange ' ]['type ' ]);
74
+ }
75
+
72
76
$ this ->eventDispatcher ->dispatch (Events::CHILD_START , new ChildStartEvent ($ this ));
73
77
$ this ->logger ->info ('Started. Waiting for jobs... ' );
74
78
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ public function processMessage(AMQPMessage $msg)
104
104
$ msg ->delivery_info ['channel ' ]->basic_ack ($ msg ->delivery_info ['delivery_tag ' ]);
105
105
}
106
106
107
+ public function setExchange ($ name , $ type )
108
+ {
109
+ $ this ->channel ->exchange_declare ($ name , $ type );
110
+ }
111
+
107
112
public function setSymfonyConsoleApp ($ console )
108
113
{
109
114
$ this ->symfony_app = $ console ;
You can’t perform that action at this time.
0 commit comments