File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,29 @@ If for some reason you don't want the connection lazy you can turn it off by set
509
509
],
510
510
```
511
511
512
+ ### Network Protocol
513
+
514
+ By default, the network protocol used for connection is tcp.
515
+ If for some reason you want to use another network protocol, you can add the extra value in your config options.
516
+
517
+ ``` php
518
+ 'connections' => [
519
+ // ...
520
+
521
+ 'rabbitmq' => [
522
+ // ...
523
+
524
+ 'options' => [
525
+ // ...
526
+
527
+ 'network_protocol' => 'network wanted',
528
+ ],
529
+ ],
530
+
531
+ // ...
532
+ ],
533
+ ```
534
+
512
535
### Octane support
513
536
514
537
Starting with 13.3.0, this package supports [ Laravel Octane] ( https://laravel.com/docs/octane ) out of the box.
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public static function make(array $config = []): AMQPConnectionConfig
37
37
38
38
self ::getHostFromConfig ($ connectionConfig , $ config );
39
39
self ::getHeartbeatFromConfig ($ connectionConfig , $ config );
40
+ self ::getNetworkProtocolFromConfig ($ connectionConfig , $ config );
40
41
});
41
42
}
42
43
@@ -90,4 +91,11 @@ protected static function getHeartbeatFromConfig(AMQPConnectionConfig $connectio
90
91
$ connectionConfig ->setHeartbeat ((int ) $ heartbeat );
91
92
}
92
93
}
94
+
95
+ protected static function getNetworkProtocolFromConfig (AMQPConnectionConfig $ connectionConfig , array $ config ): void
96
+ {
97
+ if ($ networkProtocol = Arr::get ($ config , self ::CONFIG_OPTIONS .'.network_protocol ' )) {
98
+ $ connectionConfig ->setNetworkProtocol ($ networkProtocol );
99
+ }
100
+ }
93
101
}
You can’t perform that action at this time.
0 commit comments