File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
rsocket-broker-client-spring/src/main/java/io/rsocket/broker/client/spring Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 17
17
package io .rsocket .broker .client .spring ;
18
18
19
19
import java .net .URI ;
20
- import java .util .Collections ;
21
- import java .util .List ;
22
20
23
21
import io .rsocket .RSocket ;
24
22
import io .rsocket .broker .common .spring .ClientTransportFactory ;
25
23
import io .rsocket .broker .common .spring .DefaultClientTransportFactory ;
26
24
import io .rsocket .broker .common .spring .MimeTypes ;
27
25
import io .rsocket .broker .frames .RouteSetup ;
28
- import io .rsocket .loadbalance .LoadbalanceTarget ;
29
- import io .rsocket .loadbalance .RoundRobinLoadbalanceStrategy ;
30
26
import io .rsocket .transport .ClientTransport ;
31
27
import reactor .core .Disposable ;
32
- import reactor .core .publisher .Flux ;
33
28
import reactor .core .publisher .Sinks ;
34
29
import reactor .core .publisher .Sinks .One ;
35
30
@@ -90,6 +85,7 @@ else if (key.getKey() != null) {
90
85
91
86
RSocketRequester .Builder builder = RSocketRequester .builder ()
92
87
.setupMetadata (routeSetup .build (), MimeTypes .BROKER_FRAME_MIME_TYPE )
88
+ .dataMimeType (properties .getDataMimeType () != null ? properties .getDataMimeType () : null )
93
89
.rsocketStrategies (strategies ).rsocketConnector (configurer );
94
90
95
91
//TODO: BrokerRequesterBuilderCustomizer
Original file line number Diff line number Diff line change 27
27
28
28
import org .springframework .boot .context .properties .ConfigurationProperties ;
29
29
import org .springframework .core .style .ToStringCreator ;
30
+ import org .springframework .util .MimeType ;
30
31
31
32
import static io .rsocket .broker .client .spring .BrokerClientProperties .CONFIG_PREFIX ;
32
33
@@ -49,6 +50,8 @@ public class BrokerClientProperties {
49
50
50
51
private boolean failIfMissingBrokerMetadata = true ;
51
52
53
+ private MimeType dataMimeType ;
54
+
52
55
public BrokerClientProperties () {
53
56
}
54
57
@@ -104,6 +107,14 @@ public void setFailIfMissingBrokerMetadata(boolean failIfMissingBrokerMetadata)
104
107
this .failIfMissingBrokerMetadata = failIfMissingBrokerMetadata ;
105
108
}
106
109
110
+ public MimeType getDataMimeType () {
111
+ return dataMimeType ;
112
+ }
113
+
114
+ public void setDataMimeType (MimeType dataMimeType ) {
115
+ this .dataMimeType = dataMimeType ;
116
+ }
117
+
107
118
@ Override
108
119
public String toString () {
109
120
// @formatter:off
@@ -115,6 +126,7 @@ public String toString() {
115
126
.append ("broker" , getBrokers ())
116
127
.append ("address" , address )
117
128
.append ("failIfMissingBrokerMetadata" , failIfMissingBrokerMetadata )
129
+ .append ("dataMimeType" , dataMimeType )
118
130
.toString ();
119
131
// @formatter:on
120
132
}
You can’t perform that action at this time.
0 commit comments