Skip to content

Commit 66573af

Browse files
committed
[docs] add docs for amqp secure connections.
1 parent 14ff7c1 commit 66573af

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎docs/transport/amqp.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ $factory = new AmqpConnectionFactory([
5050
// same as above but given as DSN string
5151
$factory = new AmqpConnectionFactory('amqp://user:pass@example.com:10000/%2f');
5252

53+
// SSL or secure connection
54+
$factory = new AmqpConnectionFactory([
55+
'dsn' => 'amqps:',
56+
'ssl_cacert' => '/path/to/cacert.pem',
57+
'ssl_cert' => '/path/to/cert.pem',
58+
'ssl_key' => '/path/to/key.pem',
59+
]);
60+
5361
$psrContext = $factory->createContext();
5462

5563
// if you have enqueue/enqueue library installed you can use a function from there to create the context

‎docs/transport/amqp_lib.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ $factory = new AmqpConnectionFactory([
5050
// same as above but given as DSN string
5151
$factory = new AmqpConnectionFactory('amqp://user:pass@example.com:10000/%2f');
5252

53+
// SSL or secure connection
54+
$factory = new AmqpConnectionFactory([
55+
'dsn' => 'amqps:',
56+
'ssl_cacert' => '/path/to/cacert.pem',
57+
'ssl_cert' => '/path/to/cert.pem',
58+
'ssl_key' => '/path/to/key.pem',
59+
]);
60+
5361
$psrContext = $factory->createContext();
5462

5563
// if you have enqueue/enqueue library installed you can use a function from there to create the context

0 commit comments

Comments
 (0)