File tree Expand file tree Collapse file tree 8 files changed +629
-28
lines changed
Expand file tree Collapse file tree 8 files changed +629
-28
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Property name | Reason | Fallback | Default
4040## Supported protocols
4141
4242* [ AMQP] ( https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol )
43- * [ MQTT] ( https://en.wikipedia.org/wiki/MQTT )
43+ * [ MQTT and MQTTS ] ( https://en.wikipedia.org/wiki/MQTT )
4444* [ Kafka] ( https://en.wikipedia.org/wiki/Apache_Kafka )
4545* [ WebSocket] ( https://en.wikipedia.org/wiki/WebSocket )
4646
Original file line number Diff line number Diff line change 7878 "supportedProtocols" : [
7979 " amqp" ,
8080 " mqtt" ,
81+ " mqtts" ,
8182 " kafka" ,
8283 " kafka-secure" ,
8384 " ws"
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ default:
2525 durable : true
2626 autoDelete : true
2727{%- endif %}
28- {%- if asyncapi.server(params.server).protocol() === "mqtt" %}
28+ {%- if asyncapi.server(params.server).protocol() === "mqtt" or asyncapi.server(params.server).protocol() === "mqtts" %}
2929 mqtt :
30- url : mqtt ://{{ asyncapi.server(params.server).url() | replaceServerVariablesWithValues(asyncapi.server(params.server).variables()) | stripProtocol }}
30+ url : {{ asyncapi.server(params.server).protocol() }} ://{{ asyncapi.server(params.server).url() | replaceServerVariablesWithValues(asyncapi.server(params.server).variables()) | stripProtocol }}
3131 topics : {{ asyncapi | channelNamesWithPublish | toMqttTopic | dump | safe }}
3232 qos :
3333 protocol : mqtt
Original file line number Diff line number Diff line change 1111 "hermesjs" : " 2.x" ,
1212 "hermesjs-router" : " 1.x" ,
1313 "asyncapi-validator" : " 3.0.0" ,
14- {% if asyncapi.server(params.server).protocol() === 'mqtt' -% }
14+ {% if asyncapi.server(params.server).protocol() === 'mqtt' or asyncapi.server(params.server).protocol() === 'mqtts' -% }
1515 "hermesjs-mqtt" : " 2.x" ,
1616 {%- endif -% }
1717 {% if asyncapi.server(params.server).protocol() === 'kafka' or asyncapi.server(params.server).protocol() === 'kafka-secure' -% }
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ const logger = require('./middlewares/logger');
99const errorLogger = require ( './middlewares/error-logger' ) ;
1010const config = require ( '../lib/config' ) ;
1111{ % - set protocol = asyncapi . server ( params . server ) . protocol ( ) % }
12+ { % - if protocol === 'mqtts' % }
13+ { % - set protocol = 'mqtt' % }
14+ { % - endif % }
1215const serverConfig = { { protocol | getConfig } } ;
1316const { { protocol | getProtocol | capitalize } } Adapter = require ( 'hermesjs-{{ protocol | getProtocol }}' ) ;
1417{ % - for channelName , channel in asyncapi . channels ( ) % }
You can’t perform that action at this time.
0 commit comments