File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
java/com/chat/yourway/config/websocket Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 6
6
import org .springframework .web .socket .config .annotation .EnableWebSocketMessageBroker ;
7
7
import org .springframework .web .socket .config .annotation .StompEndpointRegistry ;
8
8
import org .springframework .web .socket .config .annotation .WebSocketMessageBrokerConfigurer ;
9
+ import org .springframework .web .socket .config .annotation .WebSocketTransportRegistration ;
9
10
10
11
@ Configuration
11
12
@ EnableWebSocketMessageBroker
@@ -25,4 +26,11 @@ public void registerStompEndpoints(StompEndpointRegistry registry) {
25
26
registry .addEndpoint (properties .getEndpoint ());
26
27
registry .addEndpoint (properties .getEndpoint ()).setAllowedOriginPatterns ("*" ).withSockJS ();
27
28
}
29
+
30
+
31
+ @ Override
32
+ public void configureWebSocketTransport (WebSocketTransportRegistration registry ) {
33
+ registry .setTimeToFirstMessage (properties .getTimeToFirstMessage ());
34
+ }
35
+
28
36
}
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ public class WebsocketProperties {
17
17
private String topicPrefix ;
18
18
private String notifyPrefix ;
19
19
private String errorPrefix ;
20
+ private int TimeToFirstMessage ;
20
21
21
22
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ spring.data.redis.password=${REDIS_PASSWORD:admin}
16
16
17
17
# Hibernate
18
18
spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.PostgreSQLDialect
19
- spring.jpa.show-sql =true
19
+ # spring.jpa.show-sql=true
20
20
spring.jpa.properties.hibernate.format_sql =true
21
21
spring.jpa.hibernate.ddl-auto =validate
22
22
@@ -30,6 +30,7 @@ socket.endpoint=/chat
30
30
socket.topic-prefix =/topic
31
31
socket.notify-prefix =/specific/notify
32
32
socket.error-prefix =/specific/error
33
+ socket.time-to-first-message =999999
33
34
34
35
# Security:
35
36
security.jwt.token-type =Bearer
@@ -58,5 +59,5 @@ spring.mail.properties.mail.smtp.starttls.required=true
58
59
message.max.amount.reports =2
59
60
60
61
# Logging:
61
- logging.level.com.chat.yourway =${LOGGING_LEVEL:info }
62
+ logging.level.com.chat.yourway =${LOGGING_LEVEL:trace }
62
63
You can’t perform that action at this time.
0 commit comments