File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ enqueue:
21
21
connection_timeout : 1
22
22
buffer_size : 1000
23
23
lazy : true
24
+
25
+ # Should be true if you want to use secure connections. False by default
26
+ ssl_on : false
24
27
rabbitmq_stomp :
25
28
host : localhost
26
29
port : 61613
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class StompConnectionFactory implements PsrConnectionFactory
28
28
* 'connection_timeout' => 1,
29
29
* 'sync' => false,
30
30
* 'lazy' => true,
31
+ * 'ssl_on' => false,
31
32
* ].
32
33
*
33
34
* or
@@ -75,7 +76,8 @@ private function establishConnection()
75
76
if (false == $ this ->stomp ) {
76
77
$ config = $ this ->config ;
77
78
78
- $ uri = 'tcp:// ' .$ config ['host ' ].': ' .$ config ['port ' ];
79
+ $ scheme = ($ config ['ssl_on ' ] === true ) ? 'ssl ' : 'tcp ' ;
80
+ $ uri = $ scheme . ':// ' . $ config ['host ' ] . ': ' . $ config ['port ' ];
79
81
$ connection = new Connection ($ uri , $ config ['connection_timeout ' ]);
80
82
81
83
$ this ->stomp = new BufferedStompClient ($ connection , $ config ['buffer_size ' ]);
@@ -134,6 +136,7 @@ private function defaultConfig()
134
136
'connection_timeout ' => 1 ,
135
137
'sync ' => false ,
136
138
'lazy ' => true ,
139
+ 'ssl_on ' => false ,
137
140
];
138
141
}
139
142
}
You can’t perform that action at this time.
0 commit comments