File tree 2 files changed +2
-19
lines changed
2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 17
17
18
18
use Enqueue \AmqpLib \AmqpConnectionFactory ;
19
19
20
- $ config = [
21
- 'host ' => getenv ('RABBITMQ_HOST ' ),
22
- 'port ' => getenv ('RABBITMQ_AMQP__PORT ' ),
23
- 'user ' => getenv ('RABBITMQ_USER ' ),
24
- 'pass ' => getenv ('RABBITMQ_PASSWORD ' ),
25
- 'vhost ' => getenv ('RABBITMQ_VHOST ' ),
26
- 'receive_method ' => 'basic_consume ' ,
27
- ];
28
-
29
- $ factory = new AmqpConnectionFactory ($ config );
20
+ $ factory = new AmqpConnectionFactory (getenv ('RABBITMQ_AMQP_DSN ' ));
30
21
$ context = $ factory ->createContext ();
31
22
32
23
$ queue = $ context ->createQueue ('foo ' );
Original file line number Diff line number Diff line change 20
20
use Interop \Amqp \AmqpTopic ;
21
21
use Interop \Amqp \Impl \AmqpBind ;
22
22
23
- $ config = [
24
- 'host ' => getenv ('RABBITMQ_HOST ' ),
25
- 'port ' => getenv ('RABBITMQ_AMQP__PORT ' ),
26
- 'user ' => getenv ('RABBITMQ_USER ' ),
27
- 'pass ' => getenv ('RABBITMQ_PASSWORD ' ),
28
- 'vhost ' => getenv ('RABBITMQ_VHOST ' ),
29
- ];
30
-
31
- $ factory = new AmqpConnectionFactory ($ config );
23
+ $ factory = new AmqpConnectionFactory (getenv ('RABBITMQ_AMQP_DSN ' ));
32
24
$ context = $ factory ->createContext ();
33
25
34
26
$ topic = $ context ->createTopic ('test.amqp.ext ' );
You can’t perform that action at this time.
0 commit comments